Skip to content

删除设备 (DELETE)

更新时间:

该接口支持根据 ID 删除设备。

请求接口

DELETE /api/device/instance/{id}

TIP

访问权限:需要登录超级设备管理平台获取token,并校验token

请求参数

名称位置类型必选说明
idpathstring设备ID
X-Access-Tokenheaderstring平台 token
bodybodyobject-

响应参数

以200 Response为例,响应参数如下:

名称类型必选约束说明
» messagestringtruenone返回信息
» resultobjecttruenone返回结果
»» idstringtruenone设备ID
»» namestringtruenone设备名称
»» deviceTypeobjecttruenone设备类型
»»» textstringtruenone内容
»»» valuestringtruenone
»» photoUrlstringtruenone设备图片URL
»» productIdstringtruenone产品ID
»» productNamestringtruenone产品名称
»» stateobjecttruenone状态
»»» textstringtruenone内容
»»» valuestringtruenone
»» edgebooleantruenone是否为边缘设备
»» superDeviceTypeobjecttruenone超级设备类型
»»» textstringtruenone内容
»»» valuestringtruenone
»» creatorIdstringtruenone创建者ID
»» createTimeintegertruenone创建时间
»» createNamestringtruenone创建者姓名
»» registryTimeintegertruenone注册时间
»» features[array]truenone设备特性
»» virtualTypeobjecttruenone虚拟设备类型:真实设备、虚拟设备
»»» textstringtruenone内容
»»» valuestringtruenone
»» regulatorbooleantruenone是否为控制器
»» comeFromobjecttruenone设备来源:云生成、端生成
»»» textstringtruenone内容
»»» valuestringtruenone
»» deviceCreateTypeobjecttruenone设备新增类型
»»» textstringtruenone内容
»»» valuestringtruenone
»» modifierIdstringtruenone修改者ID
»» modifyTimeintegertruenone修改时间
»» modifyNamestringtruenone修改者姓名
» statusintegertruenone状态码
» timestampintegertruenone时间戳
»» presetTypeobjecttruenone类型
»»» textstringtruenone内容
»»» valuestringtruenone
»» categoryTypeobjecttruenone分类类型
»»» textstringtruenone内容
»»» valuestringtruenone
»» mediaDevicebooleantruenone媒体设备
» statusintegertruenone响应状态码
» timestampintegertruenone时间戳

响应状态码

状态码状态码含义说明
200OK成功
401Unauthorized登录状态已过期,token不能为空
500Internal Server Error服务器内部异常

Body 示例

json
{}
{}

返回示例

以200 Response为例:

json
{
  "message": "success",
  "result": {
    "id": "qqqqq",
    "photoUrl": "/images/card/product.png",
    "name": "qqqqqqqqqqqq",
    "deviceType": {
      "text": "直连设备",
      "value": "device"
    },
    "productId": "1684866341890375680",
    "productName": "455",
    "state": {
      "text": "在线",
      "value": "online"
    },
    "edge": false,
    "superDeviceType": {
      "text": "普通设备",
      "value": "normalDevice"
    },
    "creatorId": "1199596756811550720",
    "creatorName": "\t\r\n室内安防",
    "createTime": 1690870549840,
    "registryTime": 1690870549862,
    "features": [],
    "virtualType": {
      "text": "真实设备",
      "value": "real"
    },
    "regulator": false,
    "comeFrom": {
      "text": "云生成",
      "value": "cloud"
    },
    "deviceCreateType": {
      "text": "根据产品(超级设备模型)生成",
      "value": "fromProduct"
    },
    "modifyTime": 1690870549840,
    "modifierId": "1199596756811550720",
    "modifierName": "\t\r\n室内安防",
    "presetType": {
      "text": "非内置",
      "value": "none"
    },
    "categoryType": {
      "text": "默认类型",
      "value": "none"
    },
    "mediaDevice": false
  },
  "status": 200,
  "timestamp": 1690870553625
}
{
  "message": "success",
  "result": {
    "id": "qqqqq",
    "photoUrl": "/images/card/product.png",
    "name": "qqqqqqqqqqqq",
    "deviceType": {
      "text": "直连设备",
      "value": "device"
    },
    "productId": "1684866341890375680",
    "productName": "455",
    "state": {
      "text": "在线",
      "value": "online"
    },
    "edge": false,
    "superDeviceType": {
      "text": "普通设备",
      "value": "normalDevice"
    },
    "creatorId": "1199596756811550720",
    "creatorName": "\t\r\n室内安防",
    "createTime": 1690870549840,
    "registryTime": 1690870549862,
    "features": [],
    "virtualType": {
      "text": "真实设备",
      "value": "real"
    },
    "regulator": false,
    "comeFrom": {
      "text": "云生成",
      "value": "cloud"
    },
    "deviceCreateType": {
      "text": "根据产品(超级设备模型)生成",
      "value": "fromProduct"
    },
    "modifyTime": 1690870549840,
    "modifierId": "1199596756811550720",
    "modifierName": "\t\r\n室内安防",
    "presetType": {
      "text": "非内置",
      "value": "none"
    },
    "categoryType": {
      "text": "默认类型",
      "value": "none"
    },
    "mediaDevice": false
  },
  "status": 200,
  "timestamp": 1690870553625
}