V4.0 Reset Device Allocation Status(Deprecated)


Reset the allocation status of devices.


This version will be deprecated. It is recommended to use V2.5 Reset Device Allocation Status.

Request Format

POST https://{apigw-address}/dps-service/v4.0/pvs/device?action=reprovision

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.

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 the 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.

Samples

Request Sample

url: https://{apigw-address}/dps-service/v4.0/pvs/device?action=reprovision&orgId=yourOrgId
method: POST
requestBody:
{
    "groupId": "yourGroupId",
    "sns": [
        "yourDeviceSn"
    ]
}

Return Sample

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