该接口支持根据ID删除产品。
请求接口
DELETE /api/device-product/{id}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| id | path | string | 是 | 产品唯一标识ID |
| X-Access-Token | header | string | 是 | 平台token |
| body | body | object | 否 | - |
响应参数
以200 Response为例,响应参数如下:
| 名称 | 类型 | 必选 | 约束 | 说明 |
|---|---|---|---|---|
| » message | string | true | none | 返回信息 |
| » result | object | true | none | 返回结果 |
| »» id | string | true | none | 产品ID |
| »» name | string | true | none | 产品名称 |
| »» photoUrl | string | true | none | 产品图标URL |
| »» classifiedId | string | true | none | 产品分类ID |
| »» classifiedName | string | true | none | 产品分类名称 |
| »» messageProtocol | string | true | none | 产品协议包ID |
| »» protocolName | string | true | none | 产品协议包名称 |
| »» metadata | string | true | none | 产品物模型 |
| »» transportProtocol | string | true | none | 接入协议 |
| »» deviceType | object | true | none | 设备类型 |
| »»» text | string | true | none | 设备类型名称 |
| »»» value | string | true | none | 设备类型标识 |
| »» configuration | object | true | none | 协议配置信息 |
| »» state | integer | true | none | 产品当前状态 |
| »» creatorId | string | true | none | 创建者ID |
| »» createTime | integer | true | none | 创建时间 |
| »» accessId | string | true | none | 接入网关ID |
| »» accessProvider | string | true | none | 接入服务 |
| »» accessName | string | true | none | 接入网关名称 |
| »» storePolicy | string | true | none | 数据存储策略 |
| »» modifierId | string | true | none | 修改者ID |
| »» modifyTime | integer | true | none | 修改时间 |
| » status | integer | true | none | 响应状态码 |
| » timestamp | integer | true | none | 时间戳 |
响应状态码
| 状态码 | 状态码含义 | 说明 |
|---|---|---|
| 200 | OK | 成功 |
| 401 | Unauthorized | 登录状态已过期,token不能为空 |
| 500 | Internal Server Error | 服务器内部异常 |
Body示例
json
{}{}返回示例
以200 Response为例:
json
{
"message": "string",
"result": {
"id": "string",
"name": "string",
"photoUrl": "string",
"classifiedId": "string",
"classifiedName": "string",
"messageProtocol": "string",
"protocolName": "string",
"metadata": "string",
"transportProtocol": "string",
"deviceType": {
"text": "string",
"value": "string"
},
"configuration": {},
"state": 0,
"creatorId": "string",
"createTime": 0,
"accessId": "string",
"accessProvider": "string",
"accessName": "string",
"storePolicy": "string",
"modifierId": "string",
"modifyTime": 0
},
"status": 0,
"timestamp": 0
}{
"message": "string",
"result": {
"id": "string",
"name": "string",
"photoUrl": "string",
"classifiedId": "string",
"classifiedName": "string",
"messageProtocol": "string",
"protocolName": "string",
"metadata": "string",
"transportProtocol": "string",
"deviceType": {
"text": "string",
"value": "string"
},
"configuration": {},
"state": 0,
"creatorId": "string",
"createTime": 0,
"accessId": "string",
"accessProvider": "string",
"accessName": "string",
"storePolicy": "string",
"modifierId": "string",
"modifyTime": 0
},
"status": 0,
"timestamp": 0
}