mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Corrected curl creation examples (#14081)
This commit is contained in:
@@ -58,11 +58,15 @@ Dynamic Example:
|
||||
|
||||
```curl
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' \
|
||||
-d '{"name": "New Device Group", \
|
||||
"desc": "A very fancy dynamic group", \
|
||||
"type": "dynamic",
|
||||
"rules": "{\"condition\":\"AND\",\"rules\":[{\"id\":\"access_points.name\",\"field\":\"access_points.name\",\"type\":\"string\",\"input\":\"text\",\"operator\":\"equal\",\"value\":\"accesspoint1\"}],\"valid\":true}"}' \
|
||||
https://librenms.org/api/v0/devicegroups
|
||||
-X POST https://librenms.org/api/v0/devicegroups \
|
||||
--data-raw '
|
||||
{
|
||||
"name": "New Device Group",
|
||||
"desc": "A very fancy dynamic group",
|
||||
"type": "dynamic",
|
||||
"rules": "{\"condition\":\"AND\",\"rules\":[{\"id\":\"access_points.name\",\"field\":\"access_points.name\",\"type\":\"string\",\"input\":\"text\",\"operator\":\"equal\",\"value\":\"accesspoint1\"}],\"valid\":true}"
|
||||
}
|
||||
'
|
||||
```
|
||||
|
||||
Output:
|
||||
@@ -79,9 +83,8 @@ Static Example:
|
||||
|
||||
```curl
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' \
|
||||
-X POST \
|
||||
-d '{"name":"New Device Group","type":"static","devices":[261,271]}' \
|
||||
https://librenms.org/api/v0/devicegroups
|
||||
-X POST https://librenms.org/api/v0/devicegroups \
|
||||
-d '{"name":"New Device Group","type":"static","devices":[261,271]}'
|
||||
```
|
||||
|
||||
Output:
|
||||
|
Reference in New Issue
Block a user