Updating Edge Nodes for an Edge Device
Function
This API is used to update edge nodes for an edge device.
The functions are the same as those of the API described in Updating Devices for an Edge Node. The API described in Updating 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 |
|---|---|---|---|
| nodes | Yes | Table 3 object | Node information. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| added | No | Table 4 object | Details about the node to be bound. |
| removed | No | Array of strings | ID of the edge node to be unbound. |
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| relation | String | Yes | Relationship between the device and node. The value contains a maximum of 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. |
| comment | String | No | Description of the relationship between the device and node. The value contains a maximum of 64 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\ |
| node_ids | Array of strings | Yes | 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
{
"update_nodes": {
"removed": [],
"added": {
"comment": "hello world",
"relation": "abcd",
"node_ids": [
"592ede18-d030-4cc1-afb8-34ac1bae47f6"
]
}
}
} Error Codes
For details, see Error Codes.
Last Article: Deleting an Edge Device
Next Article: Querying an Edge Device Twin
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.