离线算法授权

接口描述

基于预授权数据为离线设备进行算法授权。

请求说明

接口ID 协议 方法 PATH
51 HTTPS POST /openapi/v1/alg/consumes/offline_grant

PATH参数

URL参数

参数 类型 必填 说明
accesskey_id string 参见签名认证
expires int 参见签名认证
signature string 参见签名认证

HTTP请求头

字段
Content-Type application/json

请求参数

请求参数以Json格式放置于Body中,如下:

参数 类型 必填 说明
offline_grant_id int 预授权数据ID(通过导入离线预授权接口获得)
product_id int 算法商品ID

请求示例

POST https://open.vzicloud.com/openapi/v1/alg/consumes/offline_grant?accesskey_id=8d9EsDAD2115Q5PM8tuP6g1IdAglkayp&expires=1619022787&signature=G29eTBjMm0gZF7cpXNLX7Hrn0yM%3D HTTP/1.1
Host: open.vzicloud.com
Content-Length: 48
Content-Type: application/json

{
  "offline_grant_id": 2001,
  "product_id": 1
}

返回说明

返回参数

参数 类型 说明
successes array 授权成功的设备列表
+ sn string 设备序列号
failures array 授权失败的设备列表
+ sn string 设备序列号
+ error object 错误信息
++ code int 错误代码
++ message string 错误描述

注:返回参数里可能还包含其他信息但未在上面的表格内列出,请勿使用!

返回示例

{
  "successes": [
    {
      "sn": "abc123456789"
    },
    {
      "sn": "def123456789"
    }
  ],
  "failures": [
    {
      "sn": "ghi123456789",
      "error": {
        "code": 40001,
        "message": "设备的型号与授权商品适用的型号不匹配"
      }
    }
  ]
}

results matching ""

    No results matching ""