Updating Devices for an Edge Node
Function
This API is used to bind or unbind an edge device to 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 |
|---|---|---|---|
| devices | Yes | devices object | Device information. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| added | No | added object | Details about the edge device to be bound. |
| removed | No | Array of strings | ID of the edge node to be unbound. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| relation | Yes | 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 value contains a maximum of 64 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\ |
| device_ids | Yes | Array of strings | A list of 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 | Mandatory | Type | Description |
|---|---|---|---|
| delete_connector | No | Boolean | Reserved field for industrial devices. |
| deploy_connector | No | Array of strings | Reserved field for industrial devices. |
| deployment_id | No | String | Reserved field for industrial devices. |
| update_devices | Yes | Table 3 Object | Device operation details. |
Response example:
{
"delete_connector": false,
"deploy_connector": false,
"deployment_id": null,
"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.
Last Article: Starting or Stopping an Edge Node
Next Article: Querying Node Certificates
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.