Delete a Device

Delete a device from an Application of Milesight Development Platform.

Request URL

DELETE {base_url}/device/openapi/v1.0/devices/{deviceId}

Request parameters

Table 1. Header Parameters
Parameter Required Type Description
Authorization Yes String The valid access token for making API calls.

The format should be Bearer {access_token}.

Table 2. Path parameters
Parameter Required Type Description
deviceId Yes Integer The unique ID of this device, which is returned when you add the device.
Note: If you did NOT save the deviceID, you can query the device's ID using Search Specific Devices.

Response parameters

Parameter Type Description
data String The SN (Serial Number) of the deleted device.
status String The result of the API request.
  • Success
  • Failed
requestId String The unique ID of the request, which can be used to quickly locate the request.

Examples

Request example
Delete the device with ID "1739930666380779522"
DELETE /device/openapi/v1.0/devices/1739930666380779522 HTTP/1.1
Host: milesight.demo.com
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InllYXN0b25lLWRlZmF1bHQta2V5LWlkIn0.eyJncmFudF90eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwic2NvcGUiOlsib3BlbmFwaSJdLCJjbGllbnRfZXh0Ijp7ImFwcF9pZCI6IjE3MzY5NTQ4MDE3MTMzMjgxMzAifSwiZXhwIjoxNzAzMjEzMDk4LCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJiYjJjN2U4Yy03NGQwLTQ4NjEtODE3MS1iYTc0NWRlMGY0NmQiLCJjbGllbnRfaWQiOiI4OTNkNzdjNy1mMGNiLTRmMzQtOWNhMS03YzJhNGNmMTEzNDgiLCJ0cyI6MTcwMzIwOTQ5ODMzNH0
Content-Type: application/json
User-Agent: OpenAPI
Response example
HTTP/1.1 200 OK
{
    "data": "6791D1970467xxxx",
    "status": "Success",
    "requestId": "1646ae38d53b3be251eda05c2245885f"
}