V2.5 Get DPS Device


Get the information of a DPS device.


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

Request Format

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

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

sn

Query

Required

String

The device SN that is generated by system and unique in this environment.

Response Parameters

Name

Data Type

Description

data

PvsDevice Struct

The information of the DPS device. For more information, see PvsDevice Struct.

Error Codes

Code

Message

Description

35400

OrgId/sn is required

The orgId is blank.

35601

Verify not pass/sn not found

The SN does not exist or is invalid.

Samples

Request Sample

url: https://{apigw-address}/dps-service/v2.5/pvs/device?action=get&orgId=yourOrgId&sn=yourSn
method: GET

Return Sample

{
  "code": 0,
  "msg": "OK",
  "requestId": "49444f28-0cd2-4c41-978d-bf40bc18feb4",
  "data": {
    "sn": "yourSn",
    "groupId": "yourGroupId",
    "regionId": null,
    "orgId": null,
    "productKey": "yourProductKey",
    "batchOrder": 2,
    "batchTag": {
      "defaultValue": "11",
      "i18nValue": {}
    },
    "deviceData": {
      "date": "2022-10-25T04:42:23.868Z",
      "energyType": "steam",
      "accessCapacity": null,
      "timezone": "+09:00",
      "assetId": "yourAssetId",
      "energyUseLink": "consumption",
      "subGroupList": [],
      "isDtu": null,
      "deviceName": {},
      "deviceSn": "yourDeviceSn",
      "isDtuSub": null
    },
    "desc": "11",
    "status": {
      "currentStatus": "init",
      "connectedTime": null,
      "allocatedTime": null,
      "finishedTime": null,
      "discardedTime": null
    },
    "reprovisioning": true,
    "allocateErrorMsg": "",
    "createBy": "userId1",
    "createTime": 1666845767197,
    "updateBy": "userId1",
    "updateTime": 1666845773571,
    "connectStatus": "init",
    "allocateStatus": "init"
  }
}