简体中文

设备分享:分享设备

分享

HTTP request (graphql)

GET /vsaas/api/v1/be?query=mutation+{deviceShare(device:String!,email:String!,credential:String!,permission:Int,description:String) String!}
POST /vsaas/api/v1/be/ 

参数

Header

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

Required

参数
类型
必选
说明
device
String
设备uid
email
String
被分享者的邮箱
credential
String
连线的凭证(密码信息)
permission
Int
bit0为允许event,bit1为允许liveview
description
String
自定义信息
 

Response

参数
类型
说明
deviceShare
String
ok or error信息

Code

200
400
401

例子

Request

curl --location --request POST 'domain/vsaas/api/v1/be/' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw 'mutation {deviceShare(email:"kate_hung@tutk.com",device:"POIUYTREWQQWERTYUIOPPOIUYTREWQQWERTYUIOP",credential:"thisisacredential")}'

Response

{

        "data": {

            "deviceShare": "ok"
        }
}

停止分享

Request

HTTP request (graphql)

GET /vsaas/api/v1/be?query=mutation+{deviceUnshare(device:String!,account:String!) String!}
POST /vsaas/api/v1/be/

参数

Header

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

Required

参数
类型
必选
说明
device
String
设备uid
acount
String
被分享者的pk,可以通过Get Device拿到,参考:设备管理API

Response

参数
类型
说明
deviceUnshare
String
ok or error信息

Code

200
400
401

例子

Request

curl --location --request POST 'domain/vsaas/api/v1/be/' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw 'mutation {deviceShare(email:"kate_hung@tutk.com",device:"POIUYTREWQQWERTYUIOPPOIUYTREWQQWERTYUIOP",credential:"thisisacredential")}'

Response

{
        "data": {

            "deviceShare": "ok"
        }
}

清空分享

Request

HTTP request (graphql)

GET /vsaas/api/v1/be?query=mutation+{clearDeviceShare(device:String!) String!}
POST /vsaas/api/v1/be/ 

参数

Header

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

Required

参数
类型
必选
说明
device
String
设备uid
 

Response

参数
类型
说明
clearDeviceShare
String
ok or error信息

Code

200
400
401

例子

Request

curl --location --request POST 'domain/vsaas/api/v1/be/' \
--header 'Authorization: Bearer token' \
--header 'Content-Type: application/json' \
--data-raw 'mutation {clearDeviceShare(device:"POIUYTREWQQWERTYUIOPPOIUYTREWQQWERTYUIOP")}'

Response

{    
        "data": {        
            "clearDeviceShare": "ok"    
        }
}


即刻开启您的物联网之旅

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

+86 755 27702549

7×24小时服务热线

法律声明 隐私权条款

关注“TUTK”

TUTK服务尽在掌握

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

TUTK服务尽在掌握

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

返回顶部