Clear Device Data

Last Updated on : 2023-06-15 05:25:23

Send a command of clearing the device data to a specified access control device. After receiving the command, the access control device will clear the relevant device data.

API address

POST: /v1.0/access-control/{device_id}/actions/cleardata

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe ID of a Tuya device.

Description of body

Parameter nameTypeINRequiredDescription
allBoolean falseClear all the data.
personBoolean falseClear the data of persons.
faceBoolean falseClear the data of faces.
cardBoolean falseClear the data of card numbers.
qrcodeBoolean falseClear the data of QR codes.
pass_pwdBoolean falseClear the data of access control passwords.
otherBoolean falseClear other data.

Return parameter

Parameter nameTypeDescription
resultCmdIssueResultResponseThe returned result.

Description of result

Parameter nameTypeDescription
snStringThe command record ID.

Request example

POST: /v1.0/access-control/6ce****/actions/cleardata
{
  "all": true,
  "person": true,
  "face": true,
  "card": true,
  "qrcode": true,
  "pass_pwd": true,
  "other": true
}

Return example

{
    "result": {
        "sn": "133****"
    },
    "t": 1561456817168,
    "success": true
}

Error code

For more information, see error code.