Freeze/Unfreeze Device

Last Updated on : 2024-06-29 02:21:11download

Based on the device ID, freeze or unfreeze the specified device.

API address

POST: /v2.0/cloud/thing/{device_id}/freeze

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringpathtrueThe device ID.

Description of body

Parameter nameTypeINRequiredDescription
stateIntegerbodytrueThe device status. Valid values:
  • 1: Freeze the specified device.
  • 0: Unfreeze the specified device.

Return parameter

Parameter nameTypeDescription
resultBooleanIndicates whether the operation is successful. Valid values:
  • true: The operation succeeded.
  • false: The operation failed.
successBooleanIndicates whether the API is called successfully. Valid values:
  • true: The API call succeeded.
  • false: The API call failed.
tLongThe timestamp.
tidStringThe link ID.

Request example

POST: /v2.0/cloud/thing/6c19224514c02f7490****/freeze
{
  "state": 0
}

Return example

{
    "tid": "b8a2b49abbbc11eda71e169efc83a172",
    "result": true,
    "t": 1678065474602,
    "success": true
}

Error code

For more information, see error code.

Limits on API Request Frequency

For more information, see Limits on API Request Frequency.