Update Device Properties Incrementally

Update the properties of a device incrementally.

Request URL

PATCH {base_url}/device/openapi/v1/devices/{deviceId}/properties

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 Long 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.
Table 3. Body Parameters
Parameter Required Type Description
properties Yes JSON The properties that need to be updated.

To view the configurable properties of different devices, see Configurable properties.

Response Parameters

Parameter Type Description
data Object<Properties_Info> Information of the updated properties.
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.
Properties_Info
Parameter Type Description
properties JSON The properties that have been updated successfully.

Examples

Request example
Update the data reporting interval for the device with device ID "1748256426492760066" to 30 minutes.
PATCH /device/openapi/v1/devices/1748256426492760066/properties HTTP/1.1
Host: demo.milesight.com
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InllYXN0b25lLWRlZmF1bHQta2V5LWlkIn0.eyJncmFudF90eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwic2NvcGUiOlsib3BlbmFwaSJdLCJjbGllbnRfZXh0Ijp7ImFwcF9pZCI6IjE3MzY5NTQ4MDE3MTMzMjgxMzAifSwiZXhwIjoxNzAzMjEzMDk4LCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJiYjJjN2U4Yy03NGQwLTQ4NjEtODE3MS1iYTc0NWRlMGY0NmQiLCJjbGllbnRfaWQiOiI4OTNkNzdjNy1mMGNiLTRmMzQtOWNhMS03YzJhNGNmMTEzNDgiLCJ0cyI6MTcwMzIwOTQ5ODMzNH0
Content-Type: application/json

{
    "properties": {
        "reporting_interval": {    
            "time": 30
        }
    }
}
Response example
HTTP/1.1 200 OK
{
    "data": {
        "properties": {
            "reporting_interval": {
                "time": 30
            }
        }
    },
    "status": "Success",
    "requestId": "d820fb189824a8809d74f76ebd02363a"
}