docs/API: Move list_locations from devices to locations (#14328)
* Remove list_locations from devices Moving to locations * Add list_locations to locations Moved from devices
This commit is contained in:
parent
8692abb830
commit
6cc9694780
|
@ -938,41 +938,6 @@ Output:
|
|||
|
||||
Output is an image.
|
||||
|
||||
### `list_locations`
|
||||
|
||||
Return a list of locations.
|
||||
|
||||
Route: `/api/v0/resources/locations`
|
||||
|
||||
Input:
|
||||
|
||||
-
|
||||
|
||||
Example:
|
||||
|
||||
```curl
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/resources/locations
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "ok",
|
||||
"locations": [
|
||||
{
|
||||
"id": "1",
|
||||
"location": "Example location, Example city, Example Country",
|
||||
"lat": "-18.911436",
|
||||
"lng": "47.517446",
|
||||
"timestamp": "2017-04-01 02:40:05"
|
||||
},
|
||||
...
|
||||
],
|
||||
"count": 100
|
||||
}
|
||||
```
|
||||
|
||||
### `list_sensors`
|
||||
|
||||
Get a list of all Sensors.
|
||||
|
|
|
@ -1,3 +1,38 @@
|
|||
### `list_locations`
|
||||
|
||||
Return a list of locations.
|
||||
|
||||
Route: `/api/v0/resources/locations`
|
||||
|
||||
Input:
|
||||
|
||||
-
|
||||
|
||||
Example:
|
||||
|
||||
```curl
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/resources/locations
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "ok",
|
||||
"locations": [
|
||||
{
|
||||
"id": "1",
|
||||
"location": "Example location, Example city, Example Country",
|
||||
"lat": "-18.911436",
|
||||
"lng": "47.517446",
|
||||
"timestamp": "2017-04-01 02:40:05"
|
||||
},
|
||||
...
|
||||
],
|
||||
"count": 100
|
||||
}
|
||||
```
|
||||
|
||||
### `add_location`
|
||||
|
||||
Add a new location
|
||||
|
|
Loading…
Reference in New Issue