Updating End Devices for an Edge Node
Function
This API is used to bind an end device to or unbind an end device from an edge node.
URI
PUT /v2/{project_id}/edgemgr/nodes/{node_id}/devices
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
node_id |
Yes |
Node ID. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Message body type (format). The default value application/json is recommended. |
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
devices |
Yes |
Table 4 object |
End device information. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
added |
No |
Table 5 object |
Details about the end device to be bound. |
removed |
No |
Array of strings |
ID of the end device to be unbound. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
relation |
No |
String |
Relationship between the node and end device. The value contains a maximum of 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
comment |
No |
String |
Description of the relationship between the node and end device. The value contains a maximum of 64 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\ |
device_ids |
Yes |
Array of strings |
A list of end device IDs. |
Example request
{ "devices":{ "added":{ "relation":"This_is_a_test_relation", "comment":"This is a test comment", "device_ids": [ "c59d8205-e786-4455-8883-12578a34ae90" ] } } }
Response
Response parameters
Parameter |
Type |
Description |
---|---|---|
delete_connector |
Boolean |
Reserved field for industrial devices. |
deploy_connector |
Array of strings |
Reserved field for industrial devices. |
deployment_id |
String |
Reserved field for industrial devices. |
update_devices |
Table 7 object |
Details about the operations on the end devices. |
Parameter |
Type |
Description |
---|---|---|
added |
Table 8 object |
Details about the end device to be bound. |
removed |
Array of strings |
ID of the end device to be unbound. |
Parameter |
Type |
Description |
---|---|---|
relation |
String |
Relationship between the node and end device. The value contains a maximum of 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
comment |
String |
Description of the relationship between the node and end device. The value contains a maximum of 64 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\ |
device_ids |
Array of strings |
A list of end device IDs. |
Example response
{ "delete_connector": false, "deploy_connector": false, "deployment_id": "", "update_devices": { "added": { "comment": "This is a test comment", "device_ids": [ "114a9718-052d-4152-a4f5-cd7ab84e6fad" ], "relation": "This_is_a_test_relation" } } }
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot