Updating an Edge Device
Function
This API is used to update an edge device.
URI
PUT /v2/{project_id}/edgemgr/devices/{device_id}
| 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 |
|---|---|---|---|
| device | Yes | Table 3 object | Device information. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| description | No | String | Edge device description. The value contains a maximum of 255 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\ |
| attributes | No | Object | Static properties of an edge device. A maximum of 64 key-value pairs are supported. The key indicates the property name. For details about the format of value, see Table 6. The following is an example: "attributes": {
"username": {
"value": "test",
"optional": true,
"metadata": {
"type": "string"
}
}
} |
Request example:
{
"device": {
"description": "new description",
"attributes": {
"username": {
"optional": true,
"value": "test-new",
"metadata": {
"type": "string"
}
}
}
}
} Response
| Parameter | Type | Description |
|---|---|---|
| device | Table 5 object | Edge device details. |
Response example:
{
"device": {
"id": "1398f13d-f24d-4de4-8cd3-5905db1d6d9f",
"name": "device",
"access_protocol": "",
"project_id": "05e1aef9040010e22fccc009adecb056",
"description": "new description",
"created_at": "2020-09-23T02:00:22.858736Z",
"updated_at": "2020-09-23T02:12:46Z",
"access_config": {},
"attributes": {
"username": {
"value": "test-new",
"optional": true,
"metadata": {
"type": "string"
}
}
},
"connection_type": "edge"
}
} Error Codes
For details, see Error Codes.
Last Article: Registering an Edge Device
Next Article: Querying Details About an Edge Device
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.