遍历算法授权列表
接口描述
按照一定条件遍历当前账号的算法授权记录列表。
请求说明
接口ID | 协议 | 方法 | PATH |
---|---|---|---|
48 | HTTPS | GET | /openapi/v1/alg/consumes |
PATH参数
无
URL参数
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
size | int | 否 | 分页大小,最大值为10000 |
page | int | 否 | 页数,最小值为1 |
wheres | string | 否 | 参见WHERES参数 |
accesskey_id | string | 是 | 参见签名认证 |
expires | int | 是 | 参见签名认证 |
signature | string | 是 | 参见签名认证 |
wheres允许填入的k:
参数 | 类型 | 说明 |
---|---|---|
sn | string | 设备序列号 |
type | int | 授权类型(0:在线授权,1:离线授权) |
order_no | string | 订单号 |
product_id | int | 商品ID |
state | int | 授权状态 (0:授权中,1:授权成功,2:已召回,3:授权失败,4:授权超时,5:离线授权) |
period_time | int | 授权时长 |
period_unit | int | 时长单位 |
grant_user_id | int | 授权用户ID |
grant_accesskey_id | string | 授权时使用的访问密钥ID |
remark | string | 备注 |
create_time | string | 创建时间 |
update_time | string | 更新时间 |
请求示例
GET https://open.vzicloud.com/openapi/v1/alg/consumes?page=1&size=10&accesskey_id=8d9EsDAD2115Q5PM8tuP6g1IdAglkayp&expires=1619022787&signature=G29eTBjMm0gZF7cpXNLX7Hrn0yM%3D HTTP/1.1
返回说明
返回参数
参数 | 类型 | 说明 |
---|---|---|
size | int | 当前分页大小 |
page | int | 当前分页页码 |
total | int | 符合条件的授权记录总数 |
items | list | 授权记录列表 |
+ sn | string | 设备序列号 |
+ type | int | 授权类型(0:在线授权,1:离线授权) |
+ product_id | int | 商品ID |
+ grant_user_id | int | 授权用户ID |
+ grant_accesskey_id | string | 授权时使用的访问密钥ID |
+ state | int | 授权状态 (0:授权中,1:授权成功,2:已召回,3:授权失败,4:授权超时,5:离线授权) |
+ order_no | string | 订单号 |
+ period_time | int | 授权时长 (0表示永久) |
+ period_unit | int | 时长单位(0:小时,1:天,2:月,3:年,4:分钟) |
+ expire_time | int | 过期时间(Unix时间戳,-1表示永久有效) |
+ remark | string | 备注 |
+ create_time | string | 创建时间 |
+ update_time | string | 更新时间 |
注:返回参数里可能还包含其他信息但未在上面的表格内列出,请勿使用!
返回示例
{
"page": 1,
"total": 2,
"items": [
{
"sn": "abc123456789",
"type": 0,
"product_id": 1,
"grant_user_id": 1001,
"grant_accesskey_id": "8d9EsDAD2115Q5PM8tuP6g1IdAglkayp",
"state": 1,
"order_no": "ORD20210618001",
"period_time": 30,
"period_unit": 1,
"expire_time": 1626681843,
"remark": "",
"create_time": "2021-06-18 11:44:03.575794",
"update_time": "2021-06-18 11:44:03.575794"
},
{
"sn": "def123456789",
"type": 0,
"product_id": 2,
"grant_user_id": 1001,
"grant_accesskey_id": "8d9EsDAD2115Q5PM8tuP6g1IdAglkayp",
"state": 1,
"order_no": "ORD20210619001",
"period_time": 90,
"period_unit": 1,
"expire_time": 1631779500,
"remark": "",
"create_time": "2021-06-19 11:45:00.123456",
"update_time": "2021-06-19 11:45:00.123456"
}
],
"size": 10000
}