Updating Edge Nodes for an End Device
Function
This API is used to update edge nodes for an end device.
The function is the same as that of the API described in Updating End Devices for an Edge Node. The API described in Updating End Devices for an Edge Node is recommended.
URI
PUT /v2/{project_id}/edgemgr/devices/{device_id}/nodes
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
device_id |
Yes |
Device ID. |
Request
Request parameters
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 |
---|---|---|---|
nodes |
Yes |
Table 4 object |
Node information. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
added |
No |
Table 5 object |
Details about the node to be bound. |
removed |
No |
Array of strings |
ID of the edge node to be unbound. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
relation |
No |
String |
Relationship between the device and node. 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 device and node. The description contains a maximum of 64 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\ |
node_ids |
Yes |
Array of strings |
Node ID list. A device can be bound to only one edge node. |
Example request
{ "nodes": { "added": { "node_ids": [ "592ede18-d030-4cc1-afb8-34ac1bae47f6" ], "relation": "abcd", "comment": "hello world" }, "removed": [] } }
Response
Response parameters
Parameter |
Type |
Description |
---|---|---|
update_nodes |
Table 7 object |
Node information. |
Parameter |
Type |
Description |
---|---|---|
added |
Table 8 object |
Details about the node to be bound. |
removed |
Array of strings |
ID of the edge node to be unbound. |
Parameter |
Type |
Description |
---|---|---|
relation |
String |
Relationship between the device and node. The value contains a maximum of 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
comment |
String |
Description of the relationship between the device and node. The description contains a maximum of 64 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\ |
node_ids |
Array of strings |
Node ID list. A device can be bound to only one edge node. |
Example response
{ "update_nodes": { "removed": [], "added": { "comment": "hello world", "relation": "abcd", "node_ids": [ "592ede18-d030-4cc1-afb8-34ac1bae47f6" ] } } }
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