Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix location missing from API device list #10215
DO NOT DELETE THIS TEXT
If you would like to test this pull request then please run:
May 13, 2019
This has not fixed the issue..
Any API experts on here?
curl -H 'X-Auth-Token: xxxxxxxxxxxx' http://localhost/api/v0/devices?type=location --- It returns 358 Device (These all have locations)
curl -H 'X-Auth-Token: xxxxxxxxxxxx' http://localhost/api/v0/devices?type=location&query=538 ---- It still returns 358 Devices (It should only return 5)
No, please read the docs. https://docs.librenms.org/API/Devices/#list_devices
I have, there is no location example.. The example to query by mac is shown as
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/devices?type=mac&query=00000c9ff013
So based on the documentation how am i wrong? Can you give me the correct way?
Ok thank you for that Ive worked it out now.. Can I suggest that the documentation actually documents this correctly?
curl -H 'X-Auth-Token: 7c0922c69d8ed85ed4ea3a61ca25fbd8' 'http://localhost/api/v0/devices?type=location&query=%locationname%'
Also to note it does not work with the location ID only the actual text stored.