V2.5 Reset Device Allocation Status


Reset the allocation status of devices.


This API is only available if 2.4 Cumulative Update 2 has been applied to your environment.

Request Format

POST https://{apigw-address}/dps-service/v2.5/pvs/device?action=resetAllocationStatus

Request Parameters (URI)

Name Location (Path/Query) Required/Optional Data Type Description
orgId Query Required String The organization ID which the device belongs to. How to get orgId>>

Request Parameters (Body)

Name Required/Optional Data Type Description
groupId Required String The registration group ID.
sns Required String Array The list of device SNs that are generated by system and unique in this environment. All SNs for batch operations must belong to the same registration group.

Response Parameters

Name Data Type Description
data String Array The list of serial numbers of devices that were successfully reset.

Error Codes

Code Message Description
35404 Group/sn not found The registration group or device SN does not exist.
35603 Unauthorized to access the resource API authentication failed as the service account does not have a DPS-related role.
99400 Invalid Argument groupId:groupId is missing The ID of the registration group is blank or invalid.

Samples

Request Sample

url: https://{apigw-address}/dps-service/v2.5/pvs/device?&orgId=yourOrgId
method: POST
requestBody:
{
    "groupId": "yourGroupId",
    "sns": [
        "sn1, sn2"
    ]
}

Return Sample

{
  "code": 0,
  "msg": "OK",
  "requestId": "b6cfea66-0cb3-44a1-a982-2693b5752d9f",
  "data": [
    "sn1, sn2"
  ]
}