云服务
云服务
云服务接口
Base URLs:
Email: Ticos Team
应用鉴权和接入配置
应用鉴权和接入配置
小程序登录
使用方式
POST /auth/miniapp/login HTTP/1.1
Content-Type: application/json
Accept: */*
POST /auth/miniapp/login
请求参数
{
"code": "string",
"appId": "string",
"appSecret": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» code | body | string | true | none |
» appId | body | string | true | none |
» appSecret | body | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» access_token | string | true | none | none |
» scope | string | true | none | none |
» id_token | string | true | none | none |
» token_type | string | true | none | none |
» expires_in | string | true | none | none |
获取已经配置的小程序应用
使用方式
GET /auth/miniapp?orgId=string HTTP/1.1
Accept: */*
GET /auth/miniapp
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | query | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» miniapps | [object] | true | none | none |
»» miniappKey | string | true | none | none |
»» miniappSecret | string | true | none | none |
»» iamKey | string | true | none | none |
»» iamSecret | string | true | none | none |
配置小程序应用
使用方式
POST /auth/miniapp HTTP/1.1
Content-Type: application/json
Accept: */*
POST /auth/miniapp
请求参数
{
"orgId": "string",
"appKey": "string",
"appSecret": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» orgId | body | string | true | none |
» appKey | body | string | true | none |
» appSecret | body | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» status | string | true | none | none |
摄像头
摄像头
创建摄像头
使用方式
POST /cameras HTTP/1.1
Content-Type: application/json
Accept: */*
POST /cameras
请求参数
{
"name": "string",
"orgId": "string",
"serialNo": "string",
"code": "string",
"pcUrl": "string",
"miniUrl": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» name | body | string | true | 摄像头名称 |
» orgId | body | string | true | 组织ID |
» serialNo | body | string | true | 摄像头序列号 |
» code | body | string | true | 摄像头验证码 |
» pcUrl | body | string | true | PC端播放地址 |
» miniUrl | body | string | true | 小程序播放地址 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
查询摄像头列表
使用方式
GET /cameras?orgId=string HTTP/1.1
Accept: */*
GET /cameras
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | query | string | true | 组织ID |
searchType | query | string | false | 1为name,2为serialNo |
searchKey | query | string | false | 模糊查询内容 |
$top | query | string | false | none |
$skip | query | string | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 摄像头ID |
» name | string | true | none | 摄像头名称 |
» orgId | string | true | none | 组织ID |
» serialNo | string | true | none | 摄像头序列号 |
» code | string | true | none | 摄像头验证码 |
» pcUrl | string | true | none | PC端播放地址 |
» miniUrl | string | true | none | 小程序播放地址 |
» createdTime | string | true | none | 创建时间 |
» updatedTime | string | true | none | 更新时间 |
删除摄像头
使用方式
DELETE /cameras/{cameraId} HTTP/1.1
Accept: */*
DELETE /cameras/{cameraId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
cameraId | path | string | true | 摄像头ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
更新摄像头
使用方式
PUT /cameras/{cameraId} HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /cameras/{cameraId}
请求参数
{
"name": "string",
"orgId": "string",
"serialNo": "string",
"code": "string",
"pcUrl": "string",
"miniUrl": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
cameraId | path | string | true | 摄像头ID |
body | body | object | false | none |
» name | body | string | false | none |
» orgId | body | string | false | none |
» serialNo | body | string | false | none |
» code | body | string | false | none |
» pcUrl | body | string | false | none |
» miniUrl | body | string | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
查询摄像头
使用方式
GET /cameras/{cameraId} HTTP/1.1
Accept: */*
GET /cameras/{cameraId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
cameraId | path | string | true | 摄像头ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 摄像头ID |
» name | string | true | none | 摄像头名称 |
» orgId | string | true | none | 组织ID |
» serialNo | string | true | none | 摄像头序列号 |
» code | string | true | none | 摄像头验证码 |
» pcUrl | string | true | none | PC端播放地址 |
» miniUrl | string | true | none | 小程序播放地址 |
» createdTime | string | true | none | 创建时间 |
» updatedTime | string | true | none | 更新时间 |
设备标签
设备标签
创建设备标签
使用方式
POST /deviceTags HTTP/1.1
Content-Type: application/json
Accept: */*
POST /deviceTags
请求参数
{
"id": "string",
"name": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» id | body | string | false | none |
» name | body | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
单设备或多设备匹配标签池中哪些标签
使用方式
GET /deviceTags?productId=string HTTP/1.1
Accept: */*
GET /deviceTags
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productId | query | string | true | 产品ID |
deviceId | query | string | false | 设备ID |
deviceIds | query | string | false | 多个设备ID |
$skip | query | string | false | 分页启始偏移量 |
$top | query | string | false | 分页取数 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» productId | string | false | none | none |
» deviceId | string | false | none | none |
» tagId | string | false | none | none |
» tagName | string | false | none | none |
» createdTime | string | false | none | none |
删除设备标签
使用方式
POST /deviceTags/{tagId} HTTP/1.1
Accept: */*
POST /deviceTags/{tagId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
tagId | path | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | string |
根据标签获取设备列表
使用方式
GET /deviceTags/{tagId}?productId=string HTTP/1.1
Accept: */*
GET /deviceTags/{tagId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
tagId | path | string | true | none |
productId | query | string | true | 产品ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» productId | string | false | none | 产品ID |
» deviceId | string | false | none | 设备ID |
» tagId | string | false | none | 标签ID |
» tagName | string | false | none | 标签名称 |
» createdTime | string | false | none | 创建时间 |
获得所有标签
使用方式
GET /deviceTags/all HTTP/1.1
Accept: */*
GET /deviceTags/all
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
$skip | query | string | false | none |
$top | query | string | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 标签ID |
» name | string | true | none | 标签名称 |
» createdTime | string | true | none | 标签创建时间 |
设备绑定标签
使用方式
POST /deviceTags/bind HTTP/1.1
Content-Type: application/json
Accept: */*
POST /deviceTags/bind
请求参数
{
"productId": "string",
"deviceId": "string",
"tagId": "string",
"tagName": "string",
"createdTime": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» productId | body | string | true | 产品ID |
» deviceId | body | string | true | 设备ID |
» tagId | body | string | true | 设备标签ID |
» tagName | body | string | true | 设备标签名称 |
» createdTime | body | string | true | 创建时间 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
设备解绑标签
使用方式
DELETE /deviceTags/unbind HTTP/1.1
Content-Type: application/json
Accept: */*
DELETE /deviceTags/unbind
请求参数
{
"productId": "string",
"deviceId": "string",
"tagId": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» productId | body | string | true | 产品ID |
» deviceId | body | string | true | 设备ID |
» tagId | body | string | true | 设备标签ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
B端用户服务
B端用户服务
用户管理相关接口服务
用户创建
使用方式
POST /users HTTP/1.1
Content-Type: application/json
Accept: */*
POST /users
请求参数
{
"name": "string",
"password": "string",
"phone": "string",
"email": "string",
"avatar": "string",
"sourceType": "string",
"sourceId": "string",
"authType": "string",
"isBindWeChat": true
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» name | body | string | false | 用户名, 用于登录和展示 |
» password | body | string | false | 密码, 用于登录 |
» phone | body | string | false | 手机号 |
body | string | false | 邮箱 | |
» avatar | body | string | false | 用户图像 |
» sourceType | body | string | false | 用户源, 可选项: TECENT |
» sourceId | body | string | false | 用户源用户ID |
» authType | body | string | false | 认证方式. 可选项, WECHAT - 微信扫码授权 |
» isBindWeChat | body | boolean | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | false | none | none |
» name | string | false | none | none |
» phone | string | false | none | none |
string | false | none | none | |
» avatar | string | false | none | none |
» password | string | false | none | none |
» isBindWeChat | boolean | false | none | none |
» createdTime | string | false | none | none |
» updatedTime | string | false | none | none |
用户注册
使用方式
POST /:id/register HTTP/1.1
Content-Type: application/json
Accept: */*
POST /:id/register
请求参数
{
"name": "string",
"phone": "string",
"otpCode": "string",
"optToken": "string",
"email": "string",
"company": "string",
"isBindWeChat": true
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
id | path | string | true | none |
body | body | object | false | none |
» name | body | string | true | none |
» phone | body | string | true | none |
» otpCode | body | string | true | none |
» optToken | body | string | true | none |
body | string | false | none | |
» company | body | string | false | none |
» isBindWeChat | body | boolean | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
用户修改
使用方式
PUT /users/:id HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /users/:id
请求参数
{
"phone": "string",
"email": "string",
"otpCode": "string",
"otpToken": "string",
"avatar": "string",
"isBindWeChat": true
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
id | path | string | true | 用户ID |
body | body | object | false | none |
» phone | body | string | false | 手机号 |
body | string | false | 邮箱 | |
» otpCode | body | string | false | 验证码 |
» otpToken | body | string | false | 验证token, 验证码发送接口返回 |
» avatar | body | string | false | 用户图像 |
» isBindWeChat | body | boolean | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | false | none | none |
» name | string | false | none | none |
» phone | string | false | none | none |
string | false | none | none | |
» avatar | string | false | none | none |
» password | string | false | none | none |
» isBindWeChat | boolean | false | none | none |
» createdTime | string | false | none | none |
» updatedTime | string | false | none | none |
删除用户
使用方式
DELETE /users/:id HTTP/1.1
Content-Type: text/plain
Accept: */*
DELETE /users/:id
请求参数
string
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
id | path | string | true | 用户ID |
body | body | string(binary) | false | raw paramter |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | string |
获取用户
使用方式
GET /users/:id HTTP/1.1
Content-Type: text/plain
Accept: */*
GET /users/:id
请求参数
string
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
id | path | string | true | 用户ID |
body | body | string(binary) | false | raw paramter |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | false | none | none |
» name | string | false | none | none |
» phone | string | false | none | none |
string | false | none | none | |
» avatar | string | false | none | none |
» password | string | false | none | none |
» isBindWeChat | boolean | false | none | none |
» createdTime | string | false | none | none |
» updatedTime | string | false | none | none |
修改密码
使用方式
POST /users/:id/changePassword HTTP/1.1
Content-Type: application/json
Accept: */*
POST /users/:id/changePassword
请求参数
{
"oldPassword": "string",
"newPassword": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
id | path | string | true | 用户ID |
body | body | object | false | none |
» oldPassword | body | string | false | 原密码 |
» newPassword | body | string | false | 新密码 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | false | none | none |
» name | string | false | none | none |
» phone | string | false | none | none |
string | false | none | none | |
» avatar | string | false | none | none |
» password | string | false | none | none |
» createdTime | string | false | none | none |
» updatedTime | string | false | none | none |
获取用户组织
使用方式
GET /users/:id/orgs?id=string HTTP/1.1
Accept: */*
GET /users/:id/orgs
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
id | path | string | true | none |
id | query | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» orgId | string | true | none | 组织id |
» name | string | true | none | 组织名称 |
» roles | string | true | none | 在该组织的角色 |
C端用户服务
C端用户服务
创建C端用户
使用方式
POST /consumers HTTP/1.1
Content-Type: application/json
Accept: */*
POST /consumers
请求参数
{
"openId": "string",
"orgId": "string",
"name": "string",
"phone": "string",
"email": "string",
"appId": "string",
"platform": "string",
"deviceCount": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» openId | body | string | true | openID |
» orgId | body | string | false | 组织ID |
» name | body | string | true | 用户名称 |
» phone | body | string | false | 手机号 |
body | string | false | email名称 | |
» appId | body | string | true | 应用ID |
» platform | body | string | true | 平台信息 |
» deviceCount | body | string | false | 绑定设备数量 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
查询C端用户服务列表
使用方式
GET /consumers?orgId=string HTTP/1.1
Accept: */*
GET /consumers
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | query | string | true | 组织ID |
searchType | query | string | false | 搜索类型,1为用户名称、2为手机号、3为email |
searchKey | query | string | false | 搜索的值 |
$top | query | string | false | 最多展现多少条 |
$skip | query | string | false | 翻页偏移量 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» userList | object | true | none | none |
»» id | string | true | none | 用户ID |
»» openId | string | true | none | none |
»» orgId | string | true | none | 组织ID |
»» name | string | true | none | 用户名称 |
»» phone | string | true | none | 手机号 |
string | true | none | 邮箱 | |
»» appId | string | true | none | 应用ID |
»» deviceCount | string | true | none | 设备数量 |
» count | string | true | none | 检索的用户总量 |
删除C端用户
使用方式
DELETE /consumers/{consumerId} HTTP/1.1
Accept: */*
DELETE /consumers/{consumerId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
consumerId | path | string | true | 用户ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
修改C端用户信息
使用方式
PUT /consumers/{consumerId} HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /consumers/{consumerId}
请求参数
{
"openId": "string",
"orgId": "string",
"name": "string",
"phone": "string",
"email": "string",
"appId": "string",
"platform": "string",
"deviceCount": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
consumerId | path | string | true | none |
body | body | object | false | none |
» openId | body | string | false | openID |
» orgId | body | string | true | 组织ID |
» name | body | string | false | 用户名称 |
» phone | body | string | false | 手机号 |
body | string | false | ||
» appId | body | string | false | 应用ID |
» platform | body | string | false | 平台信息 |
» deviceCount | body | string | false | 绑定设备数量 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
查询C端用户服务
使用方式
GET /consumers/{consumerId} HTTP/1.1
Accept: */*
GET /consumers/{consumerId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
consumerId | path | string | true | 用户ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 用户ID |
» openId | string | true | none | none |
» orgId | string | true | none | 组织ID |
» name | string | true | none | 用户名称 |
» phone | string | true | none | 手机号 |
string | true | none | 邮箱 | |
» appId | string | true | none | 应用ID |
» platform | string | true | none | 平台信息 |
» deviceCount | string | true | none | 设备数量 |
» createdTime | string | true | none | 创建时间 |
» updatedTime | string | true | none | 更新时间 |
验证码服务
验证码服务
验证码服务
发送验证码到手机
使用方式
POST /otp/phone HTTP/1.1
Content-Type: application/json
Accept: */*
POST /otp/phone
请求参数
{
"phone": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» phone | body | string | false | 手机号, 用于发送验证码 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» otpToken | string | true | none | 调用用户修改接口并且修改邮箱或者手机号时传入 |
发送验证码到邮箱
使用方式
POST /otp/email HTTP/1.1
Content-Type: application/json
Accept: */*
POST /otp/email
请求参数
{
"email": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
body | string | false | 邮箱 用于发送验证码 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» otpToken | string | true | none | 调用用户修改接口并且修改邮箱或者手机号时传入 |
我的
我的
用户绑定的设备列表
使用方式
GET /mine/devices HTTP/1.1
Accept: */*
Authorization: Bearer XXXXXX
GET /mine/devices
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
Authorization | header | string | true | Authorization (Only:Bearer XXXXXX) |
appUserId | query | string | false | B端用户调用此接口时的appUserId |
$skip | query | string | false | none |
$top | query | string | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» deviceList | [object] | true | none | none |
»» id | string | true | none | 用户设备绑定ID |
»» productId | string | true | none | 产品ID |
»» deviceId | string | true | none | 设备ID |
»» createdTime | string | true | none | 绑定时间 |
» count | string | true | none | none |
用户绑定设备
使用方式
POST /mine/devices HTTP/1.1
Content-Type: application/json
Accept: */*
Authorization: Bearer XXXXXX
POST /mine/devices
请求参数
{
"productId": "string",
"deviceId": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
Authorization | header | string | true | Authorization (Only:Bearer XXXXXX) |
body | body | object | false | none |
» productId | body | string | true | 产品ID |
» deviceId | body | string | true | 设备ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 产品设备绑定ID |
» productId | string | true | none | 产品ID |
» deviceId | string | true | none | 设备ID |
» createdTime | string | true | none | 绑定时间 |
用户解绑设备
使用方式
DELETE /mine/devices/{deviceId}?productId=string HTTP/1.1
Accept: */*
DELETE /mine/devices/{deviceId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | 设备ID |
productId | query | string | true | 产品ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
场景联动
场景联动
设备编排
创建设备编排
使用方式
POST /linkages HTTP/1.1
Content-Type: application/json
Accept: */*
POST /linkages
请求参数
{
"orgId": "string",
"id": "string",
"code": "string",
"name": "string",
"description": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» orgId | body | string | true | 组织ID |
» id | body | string | false | 联动ID |
» code | body | string | true | NodeRed源码 |
» name | body | string | true | 联动名称 |
» description | body | string | true | 联动描述 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» orgId | string | true | none | 组织ID |
» id | string | true | none | 设备编排ID |
获取设备编排列表
使用方式
GET /linkages?orgId=string HTTP/1.1
Accept: */*
GET /linkages
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | query | string | true | 联动ID |
$skip | query | string | false | 查询的偏移量 |
$top | query | string | false | 查询的最多数量 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
删除设备编排
使用方式
DELETE /linkages/{linkageId}?orgId=string HTTP/1.1
Accept: */*
DELETE /linkages/{linkageId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
linkageId | path | string | true | none |
orgId | query | string | true | 组织ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
更新设备编排
使用方式
PUT /linkages/{linkageId} HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /linkages/{linkageId}
请求参数
{
"orgId": "string",
"name": "string",
"description": "string",
"code": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
linkageId | path | string | true | none |
body | body | object | false | none |
» orgId | body | string | true | 组织ID |
» name | body | string | true | 联动名称 |
» description | body | string | true | 联动描述 |
» code | body | string | true | 联动代码 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
获取设备编排
使用方式
GET /linkages/{linkageId}?orgId=string HTTP/1.1
Accept: */*
GET /linkages/{linkageId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
linkageId | path | string | true | 联动ID |
orgId | query | string | true | 组织ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
查询设备联动的状态
使用方式
GET /linkages/{linkageId}/status?orgId=string HTTP/1.1
Accept: */*
GET /linkages/{linkageId}/status
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
linkageId | path | string | true | none |
orgId | query | string | true | 组织ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
启动设备联动
使用方式
POST /linkages/{linkageId}/start?orgId=string HTTP/1.1
Accept: */*
POST /linkages/{linkageId}/start
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
linkageId | path | string | true | none |
orgId | query | string | true | 组织ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
停止设备联动
使用方式
POST /linkages/{linkageId}/stop?orgId=string HTTP/1.1
Accept: */*
POST /linkages/{linkageId}/stop
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
linkageId | path | string | true | none |
orgId | query | string | true | 组织ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
数据大屏
数据大屏
删除数据大屏
使用方式
DELETE /digitalScreens/{digitalScreenId}?orgId=string HTTP/1.1
Accept: */*
DELETE /digitalScreens/{digitalScreenId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
digitalScreenId | path | string | true | none |
orgId | query | string | true | 组织ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
变更数据大屏信息
使用方式
PUT /digitalScreens/{digitalScreenId} HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /digitalScreens/{digitalScreenId}
请求参数
{
"orgId": "string",
"pageId": "string",
"name": "string",
"description": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
digitalScreenId | path | string | true | none |
body | body | object | false | none |
» orgId | body | string | false | none |
» pageId | body | string | false | none |
» name | body | string | false | none |
» description | body | string | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
查询数据大屏
使用方式
GET /digitalScreens/{digitalScreenId}?orgId=string HTTP/1.1
Accept: */*
GET /digitalScreens/{digitalScreenId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
digitalScreenId | path | string | true | none |
orgId | query | string | true | 组织ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
新增数据大屏
使用方式
POST /digitalScreens HTTP/1.1
Content-Type: application/json
Accept: */*
POST /digitalScreens
请求参数
{
"orgId": "string",
"pageId": "string",
"name": "string",
"description": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» orgId | body | string | true | 组织ID |
» pageId | body | string | true | 页面ID,对应洛书的菜单 |
» name | body | string | true | 数字大屏名称 |
» description | body | string | true | 数字大屏描述 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
查询数据大屏列表
使用方式
GET /digitalScreens HTTP/1.1
Accept: */*
GET /digitalScreens
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
设备
设备
设备管理相关 API
新建设备
使用方式
POST /devices HTTP/1.1
Content-Type: application/json
Accept: */*
POST /devices
请求参数
{
"productId": "string",
"name": "string",
"alias": "string",
"type": 0,
"status": 0,
"tags": [
"string"
],
"id": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» productId | body | string | true | 产品ID |
» name | body | string | true | 设备名称 |
» alias | body | string | false | 设备别名 |
» type | body | number | true | 设备类型, 1:设备\n2:子设备\n3:网关 |
» status | body | number | false | 设备状态, 1-未激活、2-离线、3-在线、4-获取失败 |
» tags | body | [string] | false | 设备标签 |
» id | body | string | false | 设备ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 设备ID |
» productId | string | true | none | 产品ID |
» name | string | true | none | 设备名称 |
» alias | string | false | none | 设备别名 |
» type | number | true | none | 设备类型, 1:设备 2:子设备 3:网关 |
» status | number | true | none | 设备状态, 1-未激活、2-离线、3-在线、4-获取失败 |
» tags | [string] | false | none | 设备标签 |
» secret | string | false | none | 密钥 |
» firmwareVersion | string | false | none | 固件版本 |
» ipAddress | string | false | none | 上次在线ip地址 |
» lastOnlineTime | string | false | none | 上次在线时间 |
» activationTime | string | false | none | 激活时间 |
» createdTime | string | false | none | 创建时间 |
» updatedTime | string | false | none | 更新时间 |
获取设备列表
使用方式
GET /devices?productId=string HTTP/1.1
Content-Type: application/json
Accept: */*
GET /devices
请求参数
{}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
$skip | query | string | false | none |
$top | query | string | false | none |
productId | query | string | true | 产品ID |
status | query | string | false | 设备状态, 1-未激活、2-离线、3-在线、4-获取失败 |
type | query | string | false | 设备类型, 1:设备2:子设备3:网关 |
deviceIds | query | string | false | 设备ID列表 |
name | query | string | false | 设备名称 |
body | body | object | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» deviceList | [object] | true | none | none |
»» id | string | false | none | 设备ID |
»» productId | string | false | none | 产品ID |
»» name | string | false | none | 设备名称 |
»» alias | string | false | none | 设备别名 |
»» type | number | false | none | 设备类型, 1:设备 2:子设备 3:网关 |
»» status | number | false | none | 设备状态, 1-未激活、2-离线、3-在线、4-获取失败 |
»» tags | [string] | false | none | 设备标签 |
»» secret | string | false | none | 密钥 |
»» firmwareVersion | string | false | none | 固件版本 |
»» ipAddress | string | false | none | 上次在线ip地址 |
»» lastOnlineTime | string | false | none | 上次在线时间 |
»» activationTime | string | false | none | 激活时间 |
»» createdTime | string | false | none | 创建时间 |
»» updatedTime | string | false | none | 更新时间 |
» count | number | true | none | none |
删除设备
使用方式
DELETE /devices/{deviceId}?productId=string HTTP/1.1
Content-Type: application/json
Accept: */*
DELETE /devices/{deviceId}
请求参数
{}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
body | body | object | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
更新设备
使用方式
PUT /devices/{deviceId}?productId=string HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /devices/{deviceId}
请求参数
{
"productId": "string",
"name": "string",
"alias": "string",
"type": 0,
"status": 0,
"tags": [
"string"
]
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
body | body | object | false | none |
» productId | body | string | false | 产品ID |
» name | body | string | false | 设备名称 |
» alias | body | string | false | 设备别名 |
» type | body | number | false | 设备类型, 1:设备 |
» status | body | number | false | 设备状态, 1-未激活、2-离线、3-在线、4-获取失败 |
» tags | body | [string] | false | 设备标签 |
详细描述
» type: 设备类型, 1:设备 2:子设备 3:网关
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 设备ID |
» productId | string | true | none | 产品ID |
» name | string | true | none | 设备名称 |
» alias | string | false | none | 设备别名 |
» type | number | true | none | 设备类型, 1:设备 2:子设备 3:网关 |
» status | number | true | none | 设备状态, 1-未激活、2-离线、3-在线、4-获取失败 |
» tags | [string] | false | none | 设备标签 |
» secret | string | false | none | 密钥 |
» firmwareVersion | string | false | none | 固件版本 |
» ipAddress | string | false | none | 上次在线ip地址 |
» lastOnlineTime | string | false | none | 上次在线时间 |
» activationTime | string | false | none | 激活时间 |
» createTime | string | false | none | 创建时间 |
» updateTime | string | false | none | 更新时间 |
查询设备详情
使用方式
GET /devices/{deviceId}?productId=string HTTP/1.1
Content-Type: application/json
Accept: */*
GET /devices/{deviceId}
请求参数
"string"
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
body | body | string(binary) | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 设备ID |
» productId | string | true | none | 产品ID |
» name | string | true | none | 设备名称 |
» alias | string | false | none | 设备别名 |
» type | number | true | none | 设备类型, 1:设备 2:子设备 3:网关 |
» status | number | true | none | 设备状态, 1-未激活、2-离线、3-在线、4-获取失败 |
» tags | [string] | false | none | 设备标签 |
» secret | string | false | none | 密钥 |
» firmwareVersion | string | false | none | 固件版本 |
» ipAddress | string | false | none | 上次在线ip地址 |
» lastOnlineTime | string | false | none | 上次在线时间 |
» activationTime | string | false | none | 激活时间 |
» createTime | string | false | none | 创建时间 |
» updateTime | string | false | none | 更新时间 |
批量更新设备信息
使用方式
POST /devices/batchUpdate HTTP/1.1
Content-Type: application/json
Accept: */*
POST /devices/batchUpdate
请求参数
{
"devices": [
{
"name": "string",
"productId": "string",
"status": "string"
}
]
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» devices | body | [object] | false | 设备信息列表 |
»» name | body | string | false | 设备名称 |
»» productId | body | string | false | 设备所属产品ID |
»» status | body | string | false | 设备状态信息 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | string |
新建设备孪生
使用方式
POST /devices/{deviceId}/twin?productId=string HTTP/1.1
Content-Type: text/plain
Accept: */*
POST /devices/{deviceId}/twin
请求参数
""
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
body | body | string(binary) | false | raw paramter |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
更新设备孪生
使用方式
PUT /devices/{deviceId}/twin?productId=string HTTP/1.1
Accept: */*
PUT /devices/{deviceId}/twin
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
删除设备孪生
使用方式
DELETE /devices/{deviceId}/twin?productId=string HTTP/1.1
Accept: */*
DELETE /devices/{deviceId}/twin
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
查询设备孪生
使用方式
GET /devices/{deviceId}/twin?productId=string HTTP/1.1
Accept: */*
GET /devices/{deviceId}/twin
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
检索数据孪生
使用方式
POST /twin?query=string HTTP/1.1
Accept: */*
POST /twin
KQL select * from digitalTwins where ???
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
query | query | string | true | 查询SQL语句 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
设备上报遥测
使用方式
POST /devices/{deviceId}/telemetry?productId=string HTTP/1.1
Accept: */*
POST /devices/{deviceId}/telemetry
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
发送设备命令
使用方式
POST /devices/{deviceId}/commands?productId=string HTTP/1.1
Accept: */*
POST /devices/{deviceId}/commands
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
desired设备属性变化
使用方式
POST /devices/{deviceId}/desired?productId=string HTTP/1.1
Content-Type: text/plain
Accept: */*
POST /devices/{deviceId}/desired
请求参数
'{"type":"object","title":"empty object","properties":{}}'
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
body | body | string(binary) | false | raw paramter |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
desired设备属性patch变化
使用方式
POST /devices/{deviceId}/patch/desired?productID=string HTTP/1.1
Content-Type: text/plain
Accept: */*
POST /devices/{deviceId}/patch/desired
请求参数
|
[
{
"op": "add",
"path": "/$metadata/color",
"value": {
"desiredValue": "blue",
"desiredVersion": 1
}
}
]
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productID | query | string | true | 产品ID |
body | body | string(binary) | false | raw paramter |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
reported设备属性变化
使用方式
POST /devices/{deviceId}/reported?productId=string HTTP/1.1
Content-Type: text/plain
Accept: */*
POST /devices/{deviceId}/reported
请求参数
|
{
"water_volume": 120,
"$lastUpdateTime": "2020-07-17T06:11:04.9309159Z",
"$requestId":"xxx"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
body | body | string(binary) | false | raw paramter |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
reported设备属性patch变化
使用方式
POST /devices/{deviceId}/patch/reported?productId=string HTTP/1.1
Content-Type: text/plain
Accept: */*
POST /devices/{deviceId}/patch/reported
请求参数
|
[
{
"op": "add",
"path": "/water_volume",
"value": 120
},
{
"op": "add",
"path": "/$metadata/water_volume/lastUpdateTime",
"value": "2020-07-17T06:11:04.9309159Z"
}
]
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
deviceId | path | string | true | none |
productId | query | string | true | 产品ID |
body | body | string(binary) | false | raw paramter |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
产品模版
产品模版
产品模版相关 API
删除产品模版
使用方式
DELETE /productTemplates/{productTemplateId} HTTP/1.1
Content-Type: application/json
Accept: */*
DELETE /productTemplates/{productTemplateId}
请求参数
{}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productTemplateId | path | string | true | none |
body | body | object | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
更新产品模版
使用方式
PUT /productTemplates/{productTemplateId} HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /productTemplates/{productTemplateId}
请求参数
{
"name": "string",
"description": "string",
"category": "string",
"iconUrl": "string",
"deviceModel": "string",
"packageInfo": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productTemplateId | path | string | true | none |
body | body | object | false | none |
» name | body | string | false | none |
» description | body | string | false | none |
» category | body | string | false | 模版所属类别, 从模版列表api获取可选类别 |
» iconUrl | body | string | false | none |
» deviceModel | body | string | false | none |
» packageInfo | body | string | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
查询设备模版详情
使用方式
GET /productTemplates/{productTemplateId} HTTP/1.1
Content-Type: application/json
Accept: */*
GET /productTemplates/{productTemplateId}
请求参数
"string"
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productTemplateId | path | string | true | none |
body | body | string(binary) | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | none |
» name | string | true | none | none |
» category | string | true | none | 模版所属类别 |
» description | string | true | none | none |
» iconUrl | string | true | none | 用于展示产品的图片地址 |
» deviceModel | string | true | none | 设备模型,用于描述设备具体功能, 采用DTDL 建模语言进行描述。关于DTDL请参考https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md |
» packageInfo | string | true | none | 产品代码信息, JSON格式字符串 |
新增产品模版
使用方式
POST /productTemplates HTTP/1.1
Content-Type: application/json
Accept: */*
POST /productTemplates
请求参数
{
"name": "string",
"category": "string",
"description": "string",
"iconUrl": "string",
"deviceModel": "string",
"packageInfo": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» name | body | string | true | none |
» category | body | string | true | 模版所属类别,从模版列表接口获取可选类别 |
» description | body | string | false | none |
» iconUrl | body | string | true | 模版产品展示的图片地址,地址从上传接口获取 |
» deviceModel | body | string | true | 设备模型,用于描述设备具体功能, 采用DTDL 建模语言进行描述。关于DTDL请参考https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md |
» packageInfo | body | string | true | 产品代码信息, JSON格式字符串 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
获取设备模版列表
使用方式
GET /productTemplates HTTP/1.1
Content-Type: application/json
Accept: */*
GET /productTemplates
请求参数
"string"
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | string(binary) | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | none |
» name | string | true | none | 第一级类别名称 |
» subCategories | [object] | true | none | none |
»» id | string | true | none | none |
»» name | string | true | none | 第二级类别名称 |
»» subCategories | [object] | true | none | none |
»»» id | string | true | none | none |
»»» name | string | true | none | 第二级类别名称 |
»»» productTemplates | [object] | true | none | none |
»»»» id | string | true | none | none |
»»»» name | string | true | none | 模版名称 |
»»»» description | string | true | none | none |
»»»» iconUrl | string | true | none | 用于展示产品的图片地址 |
产品
产品
产品管理相关 API
新建产品
使用方式
POST /products HTTP/1.1
Content-Type: application/json
Accept: */*
POST /products
请求参数
{
"name": "string",
"encryptionType": 0,
"productType": 0,
"netType": "string",
"dataProtocol": 0,
"description": "string",
"projectId": "string",
"productTemplateId": "string",
"brand": "string",
"modelNumber": "string",
"iconUrl": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» name | body | string | true | 产品名称 |
» encryptionType | body | integer | true | 加密类型,1表示证书认证,2表示签名认证 |
» productType | body | integer | true | 产品类型,0-设备,5-网关, 9 子设备 |
» netType | body | string | true | 连接类型, wifi, cellular, ble, else |
» dataProtocol | body | integer | true | 数据协议, 1 物模型 2 自定义 |
» description | body | string | false | 产品描述 |
» projectId | body | string | true | 所属项目id |
» productTemplateId | body | string | true | 设备模版ID |
» brand | body | string | false | 品牌 |
» modelNumber | body | string | false | 型号 |
» iconUrl | body | string | false | 产品展示图片, 图片地址通过上传接口获取 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | false | none | 产品ID |
» name | string | false | none | 产品名称 |
» productTemplateId | string | false | none | 产品品类模板ID |
» projectId | string | false | none | 所属项目id |
» encryptionType | integer | false | none | 加密类型 加密类型,1表示证书认证,2表示签名认证。 |
» productType | integer | false | none | 设备类型,0设备,5网关。 |
» netType | string | false | none | 连接类型 |
» dataProtocol | integer | false | none | 数据协议 1 使用物模型 2 为自定义 |
» description | string | false | none | 产品描述 |
» status | string | false | none | 状态 |
» brand | string | false | none | 品牌 |
» modelNumber | string | false | none | 型号 |
» iconUrl | string | false | none | none |
» createdTime | string | false | none | 创建时间 |
» updatedTime | string | false | none | 最后一次更新时间 |
» releasedTime | string | false | none | 发布时间 |
修改产品
使用方式
PUT /products/{productId} HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /products/{productId}
请求参数
{
"name": "string",
"description": "string",
"brand": "string",
"modelNumber": "string",
"iconUrl": "string",
"status": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productId | path | string | true | none |
body | body | object | false | none |
» name | body | string | false | 产品名称 |
» description | body | string | false | 产品描述 |
» brand | body | string | false | 品牌 |
» modelNumber | body | string | false | 型号 |
» iconUrl | body | string | false | 产品展示图片。 图片地址从上传接口获取 |
» status | body | string | false | 产品状态。 开发中 - develop, 发布 - release |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | false | none | none |
» name | string | false | none | none |
» productTemplateId | string | false | none | none |
» projectId | string | false | none | none |
» encryptionType | number | false | none | none |
» productType | number | false | none | none |
» netType | string | false | none | none |
» dataProtocol | number | false | none | none |
» description | string | false | none | none |
» status | string | false | none | none |
» firmwareId | string | false | none | none |
» brand | string | false | none | none |
» modelNumber | string | false | none | none |
» iconUrl | string | false | none | none |
» createdTime | string | false | none | none |
» updatedTime | string | false | none | none |
» releasedTime | string | false | none | none |
删除产品
使用方式
DELETE /products/{productId} HTTP/1.1
Content-Type: text/plain
Accept: */*
DELETE /products/{productId}
请求参数
'{"type":"object","title":"empty object","properties":{}}'
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productId | path | string | true | none |
body | body | string(binary) | false | raw paramter |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | string |
获取产品详情
使用方式
GET /products/{productId} HTTP/1.1
Content-Type: application/json
Accept: */*
GET /products/{productId}
请求参数
"string"
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productId | path | string | true | none |
body | body | string(binary) | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | false | none | none |
» name | string | false | none | none |
» productTemplateId | string | false | none | none |
» projectId | string | false | none | none |
» encryptionType | number | false | none | none |
» productType | number | false | none | none |
» netType | string | false | none | none |
» dataProtocol | number | false | none | none |
» firmwareId | string | false | none | none |
» description | string | false | none | none |
» status | string | false | none | none |
» brand | string | false | none | none |
» modelNumber | string | false | none | none |
» iconUrl | string | false | none | none |
» createdTime | string | false | none | none |
» updatedTime | string | false | none | none |
» releasedTime | string | false | none | none |
获取产品列表
使用方式
GET /products/?orgIds=string HTTP/1.1
Content-Type: application/json
Accept: */*
GET /products/
请求参数
{}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
projectIds | query | string | false | none |
name | query | string | false | none |
status | query | string | false | none |
$skip | query | string | false | none |
$top | query | string | false | none |
orgIds | query | string | true | none |
body | body | object | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» productList | [object] | true | none | none |
»» id | string | true | none | 产品ID |
»» name | string | false | none | 产品名称 |
»» projectId | string | false | none | 所属项目id |
»» encryptionType | integer | false | none | 加密类型 加密类型,1表示证书认证,2表示签名认证。 |
»» productType | integer | false | none | 设备类型,0设备,5网关。 |
»» netType | string | false | none | 连接类型 |
»» dataProtocol | integer | false | none | 数据协议 1 使用物模型 2 为自定义 |
»» firmwareId | string | false | none | none |
»» description | string | false | none | 产品描述 |
»» status | string | false | none | 状态, 开发中 - develop, 发布 - release |
»» brand | string | false | none | none |
»» modelNumber | string | false | none | none |
»» iconUrl | string | false | none | none |
»» productTemplateId | string | false | none | 品类方案 |
»» createdTime | string | false | none | none |
»» updatedTime | string | false | none | none |
»» releasedTime | string | false | none | none |
» count | number | true | none | none |
更新产品设备模型
使用方式
PUT /products/{productId}/deviceModel HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /products/{productId}/deviceModel
请求参数
{
"deviceModel": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productId | path | string | true | none |
body | body | object | false | none |
» deviceModel | body | string | true | 传入设备模型,用于描述设备模型的json字符串必须符合DTDL规范 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
获取产品设备模型
使用方式
GET /products/{productId}/deviceModel HTTP/1.1
Content-Type: text/plain
Accept: */*
GET /products/{productId}/deviceModel
请求参数
string
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productId | path | string | true | none |
body | body | string(binary) | false | raw paramter |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» deviceModel | string | true | none | none |
创建量产任务
使用方式
POST /products/{productId}/productions HTTP/1.1
Content-Type: application/json
Accept: */*
POST /products/{productId}/productions
请求参数
{
"generationMethod": 0,
"batchFile": "string",
"batchCount": 0
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productId | path | string | true | none |
body | body | object | false | none |
» generationMethod | body | integer | false | 生成方式, 0 系统生成 1 文件上传 |
» batchFile | body | string | false | 文件上传url, 生成方式为文件上传时填写 |
» batchCount | body | integer | false | 量产数量,生成方式为系统生成时填写 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | false | none | 量产任务ID |
» batchCount | number | true | none | 量产设备数量 |
» generationMethod | number | true | none | 生成方式 |
» status | string | true | none | 量产任务状态 |
» createdTime | string | true | none | none |
» createdUser | string | true | none | none |
获取量产数据列表
使用方式
GET /products/{productId}/productions HTTP/1.1
Content-Type: application/json
Accept: */*
GET /products/{productId}/productions
请求参数
"string"
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productId | path | string | true | none |
$skip | query | string | false | none |
$top | query | string | false | none |
body | body | string(binary) | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» productionList | [object] | true | none | none |
»» id | string | false | none | none |
»» productId | string | false | none | none |
»» generationMethod | number | false | none | none |
»» status | string | false | none | 量产任务状态 |
»» batchCount | number | false | none | 设备数量 |
»» createdTime | string | false | none | none |
»» createdUser | string | false | none | 量产创建人 |
» count | number | true | none | none |
获取量产详情
使用方式
GET /products/{productId}/productions/{productionId} HTTP/1.1
Content-Type: application/json
Accept: */*
GET /products/{productId}/productions/{productionId}
请求参数
"string"
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productId | path | string | true | none |
productionId | path | string | true | none |
body | body | string(binary) | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» batchCount | integer | false | none | 量产设备数量 |
» generationMethod | integer | false | none | 生成方式 |
» batchFile | string | false | none | 上传文件url |
» status | string | false | none | 量产任务状态 |
» createdTime | string | false | none | 创建时间 |
» createUser | string | false | none | 创建人 |
获取量产生成结果
使用方式
GET /products/{productId}/productions/{productionId}/result HTTP/1.1
Content-Type: application/json
Accept: */*
GET /products/{productId}/productions/{productionId}/result
请求参数
"string"
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productId | path | string | true | none |
productionId | path | string | true | none |
body | body | string(binary) | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» data | [object] | true | none | none |
»» productId | string | true | none | none |
»» deviceId | string | true | none | none |
»» deviceSecret | string | true | none | none |
»» status | string | true | none | none |
上传下载
上传下载
上传下载公用接口
上传
使用方式
POST /uploads HTTP/1.1
Content-Type: multipart/form-data
Accept: */*
POST /uploads
请求参数
type: string
file: string
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | true | none |
» type | body | string | true | none |
» file | body | string(binary) | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» url | string | true | none | none |
分片上传文件
使用方式
POST /uploads/multiPart HTTP/1.1
Content-Type: multipart/form-data
Accept: */*
POST /uploads/multiPart
{"key":"hyy_test2","uploadId":"1658385568f7e393bdd30b2b0876984ec5a410e69acf68d8208620e4e3f90cd94929856f97","partNumber":"1","etag":""5a615c98f0069fa03c3253147b27628a""}
请求参数
key: string
uploadId: string
partNumber: string
file: string
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | true | none |
» key | body | string | true | none |
» uploadId | body | string | true | none |
» partNumber | body | string | true | 第几片文件 |
» file | body | string(binary) | true | 文件块 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» key | string | true | none | none |
» uploadId | string | true | none | none |
» partNumber | string | true | none | none |
» etag | string | true | none | none |
分片上传文件-初始化
使用方式
POST /uploads/initMultiPart HTTP/1.1
Content-Type: application/json
Accept: */*
POST /uploads/initMultiPart
{"key":"hyy_test2","uploadId":"1658385368d7e6febc590093211fc2229e9fec0e75d2ab260fc0575dfed5f563b89c3bc483"}
请求参数
{
"key": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» key | body | string | true | 上传文件标识 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» key | string | true | none | none |
» uploadId | string | true | none | none |
分片上传文件-完成
使用方式
POST /uploads/completeMultiPart HTTP/1.1
Content-Type: multipart/form-data
Accept: */*
POST /uploads/completeMultiPart
{"fileUrl":"https://tisvc-test-1310070803.cos.ap-guangzhou.myqcloud.com/hyy_test3","fileSize":0,"fileSign":"","signMethod":"md5"}
请求参数
key: string
uploadId: string
etags: string
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | true | none |
» key | body | string | true | none |
» uploadId | body | string | true | none |
» etags | body | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» fileUrl | string | true | none | none |
» fileSize | string | true | none | none |
» fileSign | string | true | none | none |
» signMethod | string | true | none | none |
获取上传文件临时授权
使用方式
GET /uploads/auth HTTP/1.1
Content-Type: text/plain
Accept: */*
GET /uploads/auth
请求参数
string
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | string(binary) | false | raw paramter |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» secretId | string | false | none | secretId |
» secretKey | string | false | none | secretkey |
» sessionToken | string | false | none | sessionToken |
» expiredTime | number | false | none | 失效时间,UNIX 时间戳 |
» region | string | false | none | 区域 |
» bucket | string | false | none | bucket |
» provider | string | false | none | provider |
项目
项目
新建项目
使用方式
POST /projects HTTP/1.1
Content-Type: application/json
Accept: */*
POST /projects
请求参数
{
"name": "string",
"orgId": "string",
"description": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» name | body | string | true | none |
» orgId | body | string | true | none |
» description | body | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | none |
» name | string | true | none | none |
» orgId | string | true | none | none |
» description | string | true | none | none |
» createdTime | string | true | none | none |
» updatedTime | string | true | none | none |
获取项目列表
使用方式
GET /projects?orgId=string HTTP/1.1
Accept: */*
GET /projects
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | query | string | true | 根据组织获取项目 |
$skip | query | string | false | 起始位置 |
$top | query | string | false | 获取条数 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» projectList | [object] | true | none | none |
»» id | string | true | none | none |
»» name | string | true | none | none |
»» orgId | string | true | none | none |
»» description | string | true | none | none |
»» createdTime | string | true | none | none |
»» updatedTime | string | true | none | none |
» count | string | true | none | none |
删除项目
使用方式
DELETE /projects/{projectId} HTTP/1.1
Content-Type: application/json
Accept: */*
DELETE /projects/{projectId}
请求参数
{}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
projectId | path | string | true | none |
body | body | object | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
更新项目
使用方式
POST /projects/{projectId} HTTP/1.1
Content-Type: application/json
Accept: */*
POST /projects/{projectId}
请求参数
{
"name": "string",
"description": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
projectId | path | string | true | none |
body | body | object | false | none |
» name | body | string | false | none |
» description | body | string | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | none |
» name | string | true | none | none |
» orgId | string | true | none | none |
» description | string | true | none | none |
» createTime | string | true | none | none |
» updateTime | string | true | none | none |
获取项目
使用方式
GET /projects/{projectId} HTTP/1.1
Accept: */*
GET /projects/{projectId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
projectId | path | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | none |
» name | string | true | none | none |
» orgId | string | true | none | none |
» description | string | true | none | none |
» createTime | string | true | none | none |
» updateTime | string | true | none | none |
组织
组织
新建组织
使用方式
POST /orgs HTTP/1.1
Content-Type: application/json
Accept: */*
POST /orgs
请求参数
{
"name": "string",
"level": 0,
"orgType": 0,
"licenseType": "string",
"license": "string",
"code": "string",
"contacts": "string",
"phoneNumber": "string",
"idType": "string",
"idNumber": "string",
"address": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» name | body | string | true | none |
» level | body | number | false | 组织登录,1为个人版(缺省),2为专业版,3为企业版 |
» orgType | body | number | true | 组织类型,1 - 个人, 2 - 企业 |
» licenseType | body | string | false | 企业类型时必填, 企业的证照类型。可选项:营业执照 - BusinessLicense,其他 - Other |
» license | body | string | false | 企业类型时必填,证照图片地址, 地址通过上传接口获取 |
» code | body | string | false | 企业类型时必填, 企业的社会信用代码或者机构代码 |
» contacts | body | string | true | 个人类型时为注册者本人, 企业类型时为企业的联系人 |
» phoneNumber | body | string | true | 个人或者联系人电话 |
» idType | body | string | true | 个人或者联系人证件类型。 可选项: 身份证号 - ID,其他 - Others |
» idNumber | body | string | true | 个人或者联系人证件号码 |
» address | body | string | true | 通讯地址 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | none |
» appId | string | true | none | none |
» name | string | true | none | none |
» orgType | number | true | none | 组织类型,1 - 个人, 2 - 企业 |
» licenseType | string | false | none | 企业类型时必填, 企业的证照类型。可选项:营业执照,其他 |
» license | string | false | none | 企业类型时必填,证照图片地址, 地址通过上传接口获取 |
» code | string | false | none | 企业类型时必填, 企业的社会信用代码或者机构代码 |
» contacts | string | true | none | 个人类型时为注册者本人, 企业类型时为企业的联系人 |
» phoneNumber | string | true | none | 个人或者联系人电话 |
» idType | string | true | none | 个人或者联系人证件类型。 可选项: 身份证号,其他 |
» idNumber | string | true | none | 个人或者联系人证件号码 |
» address | string | true | none | 通讯地址 |
» memberInfo | object | true | none | 该组织的主账号 |
»» memberId | string | true | none | none |
»» appKey | string | true | none | none |
»» appSecret | string | true | none | none |
»» roles | [string] | true | none | 主账号权限范围 |
更新组织
使用方式
PUT /orgs/{orgId} HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /orgs/{orgId}
请求参数
{
"name": "string",
"level": 0,
"orgType": 0,
"licenseType": "string",
"license": "string",
"code": "string",
"contacts": "string",
"phoneNumber": "string",
"idType": "string",
"idNumber": "string",
"address": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | path | string | true | none |
body | body | object | false | none |
» name | body | string | true | 组织名称 |
» level | body | number | false | 组织登录,1为个人版(缺省),2为专业版,3为企业版 |
» orgType | body | number | true | 组织类型,1 - 个人, 2 - 企业 |
» licenseType | body | string | false | 企业类型时必填, 企业的证照类型。可选项:营业执照,其他 |
» license | body | string | false | 企业类型时必填,证照图片地址, 地址通过上传接口获取 |
» code | body | string | false | 企业类型时必填, 企业的社会信用代码或者机构代码 |
» contacts | body | string | true | 个人类型时为注册者本人, 企业类型时为企业的联系人 |
» phoneNumber | body | string | true | 个人或者联系人电话 |
» idType | body | string | true | 个人或者联系人证件类型。 可选项: 身份证号,其他 |
» idNumber | body | string | true | 个人或者联系人证件号码 |
» address | body | string | true | 通讯地址 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | none |
» appId | string | true | none | none |
» name | string | true | none | none |
» level | number | true | none | 组织登录,1为个人版(缺省),2为专业版,3为企业版 |
» orgType | number | true | none | 组织类型,1 - 个人, 2 - 企业 |
» licenseType | string | false | none | 企业类型时必填, 企业的证照类型。可选项:营业执照,其他 |
» license | string | false | none | 企业类型时必填,证照图片地址, 地址通过上传接口获取 |
» code | string | false | none | 企业类型时必填, 企业的社会信用代码或者机构代码 |
» contacts | string | true | none | 个人类型时为注册者本人, 企业类型时为企业的联系人 |
» phoneNumber | string | true | none | 个人或者联系人电话 |
» idType | string | true | none | 个人或者联系人证件类型。 可选项: 身份证号,其他 |
» idNumber | string | true | none | 个人或者联系人证件号码 |
» address | string | true | none | 通讯地址 |
» memberInfo | object | true | none | 该组织的主账号 |
»» memberId | string | true | none | none |
»» appKey | string | true | none | none |
»» appSecret | string | true | none | none |
»» roles | [string] | true | none | 主账号权限范围 |
获取组织信息
使用方式
GET /orgs/{orgId} HTTP/1.1
Accept: */*
GET /orgs/{orgId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | path | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | none |
» appId | string | true | none | none |
» name | string | true | none | none |
» level | number | true | none | 组织登录,1为个人版(缺省),2为专业版,3为企业版 |
» orgType | number | true | none | 组织类型,1 - 个人, 2 - 企业 |
» licenseType | string | false | none | 企业类型时必填, 企业的证照类型。可选项:营业执照,其他 |
» license | string | false | none | 企业类型时必填,证照图片地址, 地址通过上传接口获取 |
» code | string | false | none | 企业类型时必填, 企业的社会信用代码或者机构代码 |
» contacts | string | true | none | 个人类型时为注册者本人, 企业类型时为企业的联系人 |
» phoneNumber | string | true | none | 个人或者联系人电话 |
» idType | string | true | none | 个人或者联系人证件类型。 可选项: 身份证号,其他 |
» idNumber | string | true | none | 个人或者联系人证件号码 |
» address | string | true | none | 通讯地址 |
» memberInfo | object | true | none | 该组织的主账号 |
»» memberId | string | true | none | none |
»» appKey | string | true | none | none |
»» appSecret | string | true | none | none |
»» roles | [string] | true | none | 主账号权限范围 |
添加成员
使用方式
POST /orgs/{orgId}/members HTTP/1.1
Content-Type: application/json
Accept: */*
POST /orgs/{orgId}/members
请求参数
{
"userId": "string",
"roles": [
"string"
]
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | path | string | true | none |
body | body | object | false | none |
» userId | body | string | true | none |
» roles | body | [string] | true | 此成员在该组织的权限范围 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» memberId | string | true | none | none |
» roles | [string] | true | none | 此成员在该组织的权限范围 |
» appKey | string | true | none | 用于访问该组织所属数据 |
» appSecret | string | true | none | 用于访问该组织所属数据 |
» createdTime | string | true | none | 加入该组织时间 |
获取组织成员列表
使用方式
GET /orgs/{orgId}/members HTTP/1.1
Accept: */*
GET /orgs/{orgId}/members
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | path | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | none |
» name | string | true | none | none |
» roles | [string] | true | none | none |
» createdTime | string | true | none | none |
移除成员
使用方式
DELETE /orgs/{orgId}/members/{memberId} HTTP/1.1
Accept: */*
DELETE /orgs/{orgId}/members/{memberId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | path | string | true | none |
memberId | path | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
更新成员
使用方式
PUT /orgs/{orgId}/members/{memberId} HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /orgs/{orgId}/members/{memberId}
请求参数
{
"memberId": "string",
"roles": [
"string"
],
"appKey": "string",
"appSecret": "string",
"createdTime": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | path | string | true | none |
memberId | path | string | true | none |
body | body | object | false | none |
» memberId | body | string | true | none |
» roles | body | [string] | true | 此成员在该组织的权限范围 |
» appKey | body | string | true | 用于访问该组织所属数据 |
» appSecret | body | string | true | 用于访问该组织所属数据 |
» createdTime | body | string | true | 加入组织时间 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
获取成员信息
使用方式
GET /orgs/{orgId}/members/{memberId} HTTP/1.1
Accept: */*
GET /orgs/{orgId}/members/{memberId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
orgId | path | string | true | none |
memberId | path | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» memberId | string | true | none | none |
» roles | [string] | true | none | 此成员在该组织的权限范围 |
» appKey | string | true | none | 用于访问该组织所属数据 |
» appSecret | string | true | none | 用于访问该组织所属数据 |
» createdTime | string | true | none | 成员加入组织时间 |
固件版本
固件版本
固件版本
上传固件文件
使用方式
POST /firmware/{firmwareId}/file HTTP/1.1
Content-Type: multipart/form-data
Accept: */*
POST /firmware/{firmwareId}/file
请求参数
upgradeFile: string
productFile: string
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
firmwareId | path | string | true | none |
body | body | object | true | none |
» upgradeFile | body | string(binary) | true | 升级固件文件 |
» productFile | body | string(binary) | false | 生产固件文件 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» upgradeFirmwareFile | object | false | none | 升级文件信息 |
»» fileUrl | string | false | none | 文件URL地址 |
»» fileSize | number | false | none | 文件大小 |
»» fileSign | string | false | none | 文件签名 |
»» signMethod | string | false | none | 文件签名方法 |
» productFirmwareFile | object | false | none | 生产文件信息 |
»» fileUrl | string | false | none | 文件URL地址 |
»» fileSize | number | false | none | 文件大小 |
»» fileSign | string | false | none | 文件签名 |
»» signMethod | string | false | none | 文件签名方法 |
添加固件版本
使用方式
POST /firmware/{firmwareId}/versions HTTP/1.1
Content-Type: application/json
Accept: */*
POST /firmware/{firmwareId}/versions
请求参数
{
"fileUrl": "string",
"fileSize": 0,
"fileSign": "string",
"signMethod": "string",
"productFileUrl": "string",
"productFileSize": 0,
"productFileSign": "string",
"productSignMethod": "string",
"status": 0,
"version": "string",
"description": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
firmwareId | path | string | true | 固件ID |
body | body | object | false | none |
» fileUrl | body | string | true | 升级固件文件地址 |
» fileSize | body | number | true | 升级固件文件大小,单位字节 |
» fileSign | body | string | true | 升级固件签名 |
» signMethod | body | string | true | 升级签名算法, md5 |
» productFileUrl | body | string | false | 生产固件文件地址 |
» productFileSize | body | number | false | 生产固件文件大小,单位字节 |
» productFileSign | body | string | false | 生产固件签名 |
» productSignMethod | body | string | false | 生产签名算法, md5 |
» status | body | number | false | 状态,1为正常可用,2为不可用 |
» version | body | string | true | 固件版本号 |
» description | body | string | false | 版本描述 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 固件版本ID |
» firmwareId | string | true | none | 固件ID |
» fileUrl | string | true | none | 升级固件文件地址 |
» fileSize | number | true | none | 升级固件文件大小 |
» fileSign | string | true | none | 升级固件签名 |
» signMethod | string | true | none | 升级签名算法, md5 |
» productFileUrl | string | false | none | 生产固件文件地址 |
» productFileSize | number | false | none | 生产固件文件大小 |
» productFileSign | string | false | none | 生产固件签名 |
» productSignMethod | string | false | none | 生产签名算法, md5 |
» status | number | true | none | 状态,1为正常可用,2为不可用 |
» version | string | true | none | 固件版本号 |
» description | string | true | none | 版本描述 |
获取固件版本列表
使用方式
GET /firmware/{firmwareId}/versions HTTP/1.1
Content-Type: text/plain
Accept: */*
GET /firmware/{firmwareId}/versions
总页数
请求参数
""
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
firmwareId | path | string | true | none |
$skip | query | string | false | none |
$top | query | string | false | none |
body | body | string(binary) | false | raw paramter |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» firmwareVersionList | [object] | true | none | none |
»» id | string | true | none | 固件版本ID |
»» firmwareId | string | true | none | 固件ID |
»» fileUrl | string | true | none | 固件文件地址 |
»» fileSize | number | true | none | 固件文件大小 |
»» fileSign | string | true | none | 固件签名 |
»» signMethod | string | true | none | 签名算法 |
»» productFileUrl | string | true | none | 生产固件文件地址 |
»» productFileSize | number | true | none | 生产固件文件大小 |
»» productFileSign | string | true | none | 生产固件签名 |
»» productSignMethod | string | true | none | 生产签名算法 |
»» status | number | true | none | 状态,1为正常可用,2为不可用 |
»» version | string | true | none | 固件版本号 |
»» description | string | true | none | 版本描述 |
» count | number | true | none | none |
枚举值
属性 | 取值 |
---|---|
signMethod | md5 |
删除固件版本
使用方式
DELETE /firmware/{firmwareId}/versions/{versionId} HTTP/1.1
Accept: */*
DELETE /firmware/{firmwareId}/versions/{versionId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
firmwareId | path | string | true | 固件ID |
versionId | path | string | true | 固件版本ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | string |
更新固件版本
使用方式
PUT /firmware/{firmwareId}/versions/{versionId} HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /firmware/{firmwareId}/versions/{versionId}
请求参数
{
"fileUrl": "string",
"fileSize": 0,
"sign": "string",
"signMethod": "string",
"productFileUrl": "string",
"productFileSize": "string",
"productFileSign": "string",
"productSignMethod": "string",
"status": "string",
"version": "string",
"description": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
firmwareId | path | string | true | 固件ID |
versionId | path | string | true | 固件版本ID |
body | body | object | false | none |
» fileUrl | body | string | false | 升级固件文件地址 |
» fileSize | body | number | false | 升级固件文件大小 |
» sign | body | string | false | 升级固件签名 |
» signMethod | body | string | false | 升级签名算法, md5 |
» productFileUrl | body | string | false | 生产固件文件地址 |
» productFileSize | body | string | false | 生产固件文件大小 |
» productFileSign | body | string | false | 生产固件文件签名 |
» productSignMethod | body | string | false | 生产签名算法 |
» status | body | string | false | 状态,1为正常可用,2为不可用 |
» version | body | string | false | 固件版本号 |
» description | body | string | false | 版本描述 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 固件版本ID |
» firmwareId | string | true | none | 固件ID |
» fileUrl | string | true | none | 升级固件文件地址 |
» fileSize | number | true | none | 升级固件文件大小 |
» sign | string | true | none | 升级固件签名 |
» signMethod | string | true | none | 升级固件签名算法, md5 |
» productFileUrl | string | true | none | 生产固件文件地址 |
» productFileSize | string | true | none | 生产固件文件大小 |
» productFileSign | string | true | none | 生产固件签名 |
» productSignMethod | string | true | none | 生产固件签名算法, md5 |
» version | string | true | none | 固件版本号 |
» description | string | true | none | 版本描述 |
获取固件版本详情
使用方式
GET /firmware/{firmwareId}/versions/{versionId} HTTP/1.1
Accept: */*
GET /firmware/{firmwareId}/versions/{versionId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
firmwareId | path | string | true | 固件ID |
versionId | path | string | true | 固件版本ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 固件版本ID |
» firmwareId | string | true | none | 固件ID |
» fileUrl | string | true | none | 升级固件文件地址 |
» fileSize | number | true | none | 升级固件文件大小 |
» sign | string | true | none | 升级固件签名 |
» signMethod | string | true | none | 升级固件签名算法, md5 |
» productFileUrl | string | true | none | 生产固件文件地址 |
» productFileSize | number | true | none | 生产固件文件大小 |
» productFileSign | string | true | none | 生产固件签名 |
» productSignMethod | string | true | none | 生产固件签名算法, md5 |
» status | number | true | none | 状态,1为正常可用,2为不可用 |
» version | string | true | none | 固件版本号 |
» description | string | true | none | 版本描述 |
固件的升级任务
固件的升级任务
固件升级接口
添加固件升级任务
使用方式
POST /ota/updates HTTP/1.1
Content-Type: application/json
Accept: */*
POST /ota/updates
请求参数
{
"products": [
"string"
],
"targetVersion": "string",
"sourceVersions": [
"string"
],
"upgradeScope": 0,
"deviceListId": "string",
"greyCount": 0,
"upgradeMode": 0,
"description": "string",
"firmwareId": "string",
"status": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» products | body | [string] | true | 产品ID列表 |
» targetVersion | body | string | true | 目标版本 |
» sourceVersions | body | [string] | true | 待升级版本列表 |
» upgradeScope | body | number | true | 升级范围, all 1/test 2/package 3/gray 4 |
» deviceListId | body | string | false | 自主上传设备包ID(暂时不做) |
» greyCount | body | number | false | 灰度升级的数量 |
» upgradeMode | body | number | true | 升级方式, force 1/hint 2 |
» description | body | string | true | 更新说明 |
» firmwareId | body | string | true | 固件ID |
» status | body | string | true | 升级任务状态 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 升级任务ID |
» organizationId | string | true | none | 组织ID |
» firmwareId | string | true | none | 固件ID |
» status | number | true | none | 升级任务状态 |
» products | [string] | true | none | 产品ID列表 |
» targetVersion | string | true | none | 目标版本 |
» sourceVersions | [string] | true | none | 待升级版本列表 |
» upgradeScope | number | true | none | 升级范围, all 1/test 2/package 3/gray 4 |
» upgradeMode | number | true | none | 升级方式, force 1/hint 2 |
» description | string | true | none | 更新说明 |
» createUserId | string | false | none | 创建用户ID |
» createUserName | string | false | none | 创建用户名称 |
» updateUserId | string | false | none | 更新用户ID |
» updateUserName | string | false | none | 更新用户名称 |
» createdTime | string | true | none | 创建时间 |
» updatedTime | string | true | none | 更新时间 |
查看固件升级任务列表
使用方式
GET /ota/updates?%24skip=string&%24top=string&orgId=string&firmwareIds=string HTTP/1.1
Accept: */*
GET /ota/updates
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
$skip | query | string | true | none |
$top | query | string | true | none |
orgId | query | string | true | 组织ID |
firmwareIds | query | string | true | 固件ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» upgradeTaskList | [object] | false | none | none |
»» id | string | false | none | 升级任务ID |
»» organizationId | string | false | none | 组织ID |
»» firmwareId | string | false | none | 固件ID |
»» status | number | false | none | 升级任务状态 |
»» products | [string] | false | none | 产品ID列表 |
»» targetVersion | string | false | none | 目标版本 |
»» sourceVersions | [string] | false | none | 待升级版本列表 |
»» upgradeScope | number | false | none | 升级范围, all/test/package |
»» upgradeMode | number | false | none | 升级方式, force/hint |
»» description | string | false | none | 更新说明 |
»» createUserId | string | false | none | 更新说明 |
»» createUserName | string | false | none | 更新说明 |
»» updateUserId | string | false | none | 更新说明 |
»» updateUserName | string | false | none | 更新说明 |
»» createdTime | string | false | none | 更新说明 |
»» updatedTime | string | false | none | 更新说明 |
» count | number | true | none | none |
删除固件升级任务
使用方式
DELETE /ota/updates/{updateId} HTTP/1.1
Content-Type: application/json
Accept: */*
DELETE /ota/updates/{updateId}
请求参数
{}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
updateId | path | string | true | none |
body | body | object | false | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|
更新固件升级任务信息
使用方式
PUT /ota/updates/{updateId} HTTP/1.1
Content-Type: application/json
Accept: */*
PUT /ota/updates/{updateId}
请求参数
{
"products": [
"string"
],
"targetVersion": "string",
"sourceVersions": [
"string"
],
"upgradeScope": 0,
"devicePackageId": "string",
"upgradeMode": 0,
"description": "string",
"firmwareId": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
updateId | path | string | true | none |
body | body | object | false | none |
» products | body | [string] | false | 产品ID列表 |
» targetVersion | body | string | false | 目标版本 |
» sourceVersions | body | [string] | false | 待升级版本列表 |
» upgradeScope | body | number | false | 升级范围, all 1/test 2/package 3/gray 4 |
» devicePackageId | body | string | false | 自主上传设备包ID |
» upgradeMode | body | number | false | 升级方式, force/hint |
» description | body | string | false | 更新说明 |
» firmwareId | body | string | false | 固件ID |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 升级任务ID |
» organizationId | string | true | none | 组织ID |
» firmwareId | string | true | none | 固件ID |
» status | number | true | none | 升级任务状态 |
» products | [string] | true | none | 产品ID列表 |
» targetVersion | string | true | none | 目标版本 |
» sourceVersions | [string] | true | none | 待升级版本列表 |
» upgradeScope | number | true | none | 升级范围, all 1/test 2/package 3/gray 4 |
» upgradeMode | number | true | none | 升级方式, force/hint |
» description | string | true | none | 更新说明 |
» createUserId | string | false | none | 创建用户ID |
» createUserName | string | false | none | 创建用户名称 |
» updateUserId | string | false | none | 更新用户ID |
» updateUserName | string | false | none | 更新用户名称 |
» createdTime | string | true | none | 创建时间 |
» updatedTime | string | true | none | 更新时间 |
查看固件升级信息
使用方式
GET /ota/updates/{updateId} HTTP/1.1
Accept: */*
GET /ota/updates/{updateId}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
updateId | path | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» id | string | true | none | 升级任务ID |
» organizationId | string | true | none | 组织ID |
» firmwareId | string | true | none | 固件ID |
» status | number | true | none | 升级任务状态 |
» products | [string] | true | none | 产品ID列表 |
» targetVersion | string | true | none | 目标版本 |
» sourceVersions | [string] | true | none | 待升级版本列表 |
» upgradeScope | number | true | none | 升级范围, all 1/test 2/package 3/gray 4 |
» upgradeMode | number | true | none | 升级方式, force/hint |
» description | string | true | none | 更新说明 |
» createUserId | string | false | none | 创建用户ID |
» createUserName | string | false | none | 创建用户名称 |
» updateUserId | string | false | none | 更新用户ID |
» updateUserName | string | false | none | 更新用户名称 |
» createdTime | string | true | none | 创建时间 |
» updatedTime | string | true | none | 更新时间 |
获得可升级固件信息
使用方式
GET /ota/checkUpdate?productId=string&deviceId=string¤tVersion=string HTTP/1.1
Accept: */*
GET /ota/checkUpdate
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
productId | query | string | true | none |
deviceId | query | string | true | none |
currentVersion | query | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» targetVersion | string | false | none | none |
» fileUrl | string | false | none | none |
» fileSize | string | false | none | none |
» sign | string | false | none | none |
» signMethod | string | false | none | none |
» versionDescription | string | false | none | none |
升级结果上报
使用方式
POST /ota/upgradeResult HTTP/1.1
Content-Type: application/json
Accept: */*
POST /ota/upgradeResult
请求参数
{
"taskId": "string",
"productId": "string",
"deviceId": "string",
"firmwareId": "string",
"sourceVersion": "string",
"targetVersion": "string",
"status": 0,
"processRatio": "string"
}
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
body | body | object | false | none |
» taskId | body | string | false | 升级任务ID |
» productId | body | string | true | 产品ID |
» deviceId | body | string | true | 设备ID |
» firmwareId | body | string | false | 固件ID |
» sourceVersion | body | string | true | 升级后固件版本ID |
» targetVersion | body | string | false | 升级前固件版本ID |
» status | body | number | true | 固件升级结果,1-检测升级、2-升级中、3-升级成功、4-升级失败 |
» processRatio | body | string | false | 当status为2时,需要有此字段上报升级进度百分比,值为0-100 |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | string |
上传设备包(暂不实现)
使用方式
POST /ota/updates/{updateId}/devicePackage?file=string HTTP/1.1
Accept: */*
POST /ota/updates/{updateId}/devicePackage
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
updateId | path | string | true | none |
file | query | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» devicePackageId | string | true | none | none |
查看固件升级统计数据
使用方式
GET /ota/updates/{updateId}/stats HTTP/1.1
Accept: */*
GET /ota/updates/{updateId}/stats
参数说明
参数 | 位置 | 类型 | 必需 | 描述 |
---|---|---|---|---|
updateId | path | string | true | none |
响应结果示例
200 Response
响应状态
状态 | 含义 | 描述 | Schema |
---|---|---|---|
200 | OK | successful operation | Inline |
Response Schema
Status Code 200
empty object
Name | Type | Required | Restrictions | Description |
---|