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. |
PvsDevice Struct ¶
Name |
Data Type |
Description |
---|---|---|
sn |
String |
The device SN that is generated by system and unique in this environment. |
groupId |
String |
The registration group ID. |
regionId |
String |
The ID of the region to which the device is allocated. |
orgId |
String |
The ID of the OU to which the device is allocated. |
productKey |
String |
The corresponding product key of the device in the EnOS Management Console. |
batchOrder |
Integer |
The device creation batch number. |
batchTag |
StringI18n |
The device creation batch tag. Internationalized name representation >> |
deviceData |
Map |
The device master data. |
desc |
String |
The device description. |
status |
PvsDeviceStatus Struct |
The current status of the device. For more information, see PvsDeviceStatus Struct. |
reprovisioning |
Boolean |
|
allocateErrorMsg |
String |
The information of the device’s last allocation failure. |
createBy |
String |
Ther user ID of the person who created the device. |
createTime |
Long |
The time the device was created. |
updateBy |
String |
The user ID of the person who updated the device. |
updateTime |
Long |
The time the device was updated. |
manufacturerOrgId |
String |
The ID of the organization where the device is pre-registered. |
connectStatus |
String |
The device connection status. Values include |
allocateStatus |
String |
The device allocation status. Values include |
PvsDeviceStatus Struct ¶
Name |
Data Type |
Description |
---|---|---|
currentStatus |
String |
The device current status. Values include |
connectedTime |
Long |
The time the device was connected. |
allocatedTime |
Long |
The time the device was allocated. |
finishedTime |
Long |
The time the device finished activation. |
discardedTime |
Long |
THe time the device was discarded. |
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"
}
}