简体中文

方案管理:绑定、解绑、查询



创建合约

这部分需由第三方云端向TUTK VSaaS发起请求,具体可以参考:第三方云对接TUTK VSaaS

合约绑定设备

将方案绑定到指定设备。

Request

HTTP request (graphql)

POST https://vsaas-domain/vsaas/api/v1/be/
 

参数

Header

Authorization : JWT or Bearer {access token}
The access token.
Content-Type : application/json

Required

参数
类型
必选
说明
contract
String
方案的Contract ID
device
String
设备端的UDID

 

Response

参数
类型
说明
create_binding
String
方案绑定结果

Code

200
400
401

例子

Request

curl -XPOST -H 'Authorization: Bearer yJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' -H 'Content-Type: application/json -d 'mutation {create_binding(contract:"5c3c685d023bde0e7828aa4a",device:"QWERTYUIOPPOIUYTREWQ")}' https://vsaas-domain/vsaas/api/v1/be/

Response

{   
    "data": {
        "create_binding": "Bind contract finish."    
    }
}

查询合约

Request

HTTP request

GET http://vsaas-domain/vsaas/api/v1/ss/contract/{id} 

参数

Header

Authorization : JWT or Bearer {access token}
The access token.
Content-Type : application/json

Required

参数
类型
必选
说明
id
String

 

Response

参数
类型
说明
data
json object

durationType
String

expires
Time

state
String

contractId
String

Code

200
400
401

例子

Request

curl \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <Oauth token>' \
http://vsaas-domain/vsaas/api/v1/ss/contract/93FEE01553D71FE0AA0F

Response

{
    "data": {
        "durationType": "Regular",
        "expires": "2019-10-02T03:12:19.948Z",
        "state": "Expired",
        "contractId": "93FEE01553D71FE0AA0F"
    }
}

设备合约解绑

将方案与设备解绑

Request

HTTP request (graphql)

POST https://vsaas-domain/vsaas/api/v1/be/
 

参数

Header

Authorization : JWT or Bearer {access token}
The access token.
Content-Type : application/json

Required

参数
类型
必选
说明
device
String
设备端的UDID
 

Response

参数
类型
说明
remove_binding
String
方案解绑结果

Code

200
400
401

例子

Request

curl -XPOST -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9' -H 'Content-Type: application/json -d 'mutation {remove_binding(device:"POIUYTREWQQWERTYUIOP")}'  https://vsaas-domain/vsaas/api/v1/be/

Response

{   
    "data": {
        "remove_binding": "remove contract finish."    
    }
}

方案列表查询

查询方案列表

Request

HTTP request (graphql)

POST https://vsaas-domain/vsaas/api/v1/be/
 

参数

Header

Authorization : JWT or Bearer {access token}
The access token.
Content-Type : application/json

Required

参数
类型
必选
说明
device
String
设备端的UDID
pk
String
事件的id
 

Response

参数
类型
说明
pk
String

create
String
创建时间
updated
String
修改事件
verdor
String
verdor id
start_time
Time
开始时间
expires
Time
到期时间
account
String
账户
plan
String
方案ID
state
String
状态
nickname
String
名称
description
String
描述
devices
Device List
uids
duration
Int
单个事件时长
max_bound_device
Int

device_bound
Int

max_download_limit
Int

download_usage
Int

max_storage_size
Float
最大的存储空间
storate_usage
Float
存储使用率
video_max_fps
Int
视频帧率
video_max_bps
Int
视频码率
video_max_height
Int
视频高
video_max_width
Int
视频宽
recording_max_kpbs
Int
录像最高码率
event_recording_max_length
Int
事件最高时长
event_duration
Int
时间时长
media_type
Int
媒体类型
event_policy
Int

Code

200
400
401

例子

Request

curl -XPOST -H 'Authorization: JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODAyODgzNzksImlhdCI6MTU0ODc1MjM3OSwiaWQiOiI1YjFkZjY1ZGYwYjMyODRkMGRjNTU5YWYiLCJ0YWciOiIxMWUwMjI0MyJ9.JBFyr3XZUa_95uZHMZrx-tXyTCIfBlBQGY2GWvGQloQ' -d 'query {get_contract_list {pk,account,duration_type,state,created,updated,expires,nickname,description,devices{udid}}}' https://vsaas-domain/vsaas/api/v1/be/

Response

{   
    "data": {
        "get_contract_list": [
            {
                "account": "5b1df65df0b3284d0dc559af",                
                "devices": [
                    {
                        "uid":"QWERTYUIOPPOIUYTREWW"                    
                   }
                ],
                "created": "2019-02-21T10:15:13.055Z",                
                "description": "7 days general event plan",
                "expires": "2019-03-02T00:00:00Z",                
                "nickname": "GeneralEvent7DaysPlan",                
                "media_type": "FREE_PLAN",
                "pk": "5c6e7a311d41c87815d585ed",
                "state": "Activated",
                "duration_type": "Regular",
                "updated": "2019-02-21T10:15:13.055Z"
            }
        ]
    }
}


即刻开启您的物联网之旅

联系解决方案专家
Kalay App
解决方案
新闻动态
公司动态
行业资讯
媒体报道
永续发展
经营者的话
社会参与
环境永续
公司治理

+86 755 27702549

7×24小时服务热线

法律声明 隐私权条款

关注“TUTK”

TUTK服务尽在掌握

© 2022 物联智慧科技(深圳)有限公司版权所有粤ICP备14023641号
在线咨询
扫一扫

TUTK服务尽在掌握

全国免费服务热线
+86 755 27702549

返回顶部