产品API

判断产品存在

接口地址:
HTTP请求方式:
  • POST
请求参数:
  • 接口公共参数
  • pid int 产品id
响应代码:
  • 共通返回
  • 12 产品不存在

实例:

curl -X POST 'https://www.cdnbest.com/api/?c=product&a=isExits' -d 'r=123456&s=smdh4t634&uid=1000&pid=1'

返回参考(JSON):

  • 返回成功:

    {"code":1,"created_at":"2016-02-17 09:51:31","message":"操作成功"}
    
  • 返回失败:

    {"code":10,"created_at":"2016-02-17 09:51:06","message":"操作失败,error=连接失败"}
    

获取产品分组信息

接口地址:
HTTP请求方式:
  • POST
请求参数:
  • 接口公共参数
  • pid int 产品id
响应代码:
  • 共通返回

实例:

curl -X POST 'https://www.cdnbest.com/api/?c=product&a=getProductGroup' -d 'r=123456&s=smdh4t634&uid=1000&pid=1'
返回参考(JSON):
  • 返回成功:

    {"status":{"code":1,"created_at":"2016-02-17 10:13:16","message":"操作成功"},"rows":[{"id":"0","uid":"1004","ngid":"334","name":"产品","ttl":"500"},{"id":"1","uid":"1004","ngid":"334","name":"分组","ttl":"200"}]}
    
  • 返回失败

    {"code":10,"created_at":"2016-02-17 09:51:06","message":"操作失败"}
    

获取所有产品信息

接口地址:
HTTP请求方式:
  • POST
请求参数:
  • 接口公共参数
响应代码:
  • 共通返回

实例:

curl -X POST 'https://www.cdnbest.com/api/?c=product&a=getByUid' -d 'r=123456&s=smdh4t634&uid=1000'
返回参考(JSON):
  • 返回成功:

    {"status":{"code":1,"created_at":"2016-02-17 10:17:19","message":"操作成功"},"rows":[{"id":"174","name":"初级","ngid":"315","uid":"1004","domain_limit":"0","max_connect":"0","speed_limit":"0","log_handle":"1","max_worker":"0","flow_limit":"0","flow_price":"0","domain_lock":"0","default_pgid":"3","default_status":"0","price":"0","cname":"","describe":"","ptype":"0","flags":"1","verify":"0"},{"id":"166","name":"高级","ngid":"334","uid":"1004","domain_limit":"0","max_connect":"0","speed_limit":"0","log_handle":"1","max_worker":"0","flow_limit":"0","flow_price":"0","domain_lock":"0","default_pgid":"0","default_status":"0","price":"0","cname":"","describe":"","ptype":"0","flags":"1","verify":"0"}],"dns_domain":"zhangqi.com"}
    
  • 返回失败:

    {"code":10,"created_at":"2016-02-17 09:51:06","message":"操作失败"}