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:
bp0 2022-09-08 22:16:52 -05:00 committed by GitHub
parent 8692abb830
commit 6cc9694780
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 35 deletions

View File

@ -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.

View File

@ -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