mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
This commit is contained in:
@@ -678,8 +678,8 @@ Route: /api/v0/devices/:hostname
|
||||
|
||||
Input (JSON):
|
||||
|
||||
- field: The column name within the database
|
||||
- data: The data to update the column with
|
||||
- field: The column name within the database (can be an array of fields)
|
||||
- data: The data to update the column with (can be an array of data))
|
||||
|
||||
Examples:
|
||||
```curl
|
||||
@@ -697,6 +697,21 @@ Output:
|
||||
]
|
||||
```
|
||||
|
||||
```curl
|
||||
curl -X PATCH -d '{"field": ["notes","purpose"], "data": ["This server should be kept online", "For serving web traffic"]}' -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/devices/localhost
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```text
|
||||
[
|
||||
{
|
||||
"status": "ok",
|
||||
"message": "Device fields have been updated"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### <a name="api-route-get_device_groups">Function `get_device_groups`</a> [`top`](#top)
|
||||
|
||||
List the device groups that a device is matched on.
|
||||
|
Reference in New Issue
Block a user