V2.5 Update DPS Device


Update a DPS device.


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

Prerequisites

Ensure that the master data groups and registration groups has been created for the DPS devices in EnOS Management Console.

Request Format

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

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

sn

Required

String

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

desc

Optional

String

The device description.

batchTag

Optional

StringI18n

The device creation batch tag. Internationalized name representation >>

deviceData

Optional

Map (Key is of String type and the Value is of Integer, String, Enum or Date type)

The device master data. The Key is the identifier of the master data and the value must correspond to the data type pf the master data. Ensure that you have created the master data or use the Built-in master data.

Response Parameters

Name

Data Type

Description

data

String

The device SN.

Error Codes

Code

Message

Description

99400

Invalid Argument groupId:groupId is missing

The ID of the registration group is blank or invalid.

99400

Invalid Argument count:count is missing

The number of devices to create is blank.

99400

count of PvsDeviceCreateInfo must between 1 to 1000000

The number of devices to create is invalid.

35404

Group not found

The registration group does not exist.

35601

Illegal deviceSn, deviceSn duplicated

The SN exists already.

Samples

Request Sample

url: https://{apigw-address}/dps-service/v2.5/pvs/device?action=update&orgId=yourOrgId
method: POST
requestBody:
{
    "sn": "yourSn",
    "deviceData" : {}
}

Return Sample

{
  "code": 0,
  "msg": "OK",
  "requestId": "6e13b720-20d8-4ab1-8f34-060f89e569ed",
  "data": [
    "yourDeviceSn"
  ]
}