mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
api: API allow cidr network searches of the ARP table (#6378)
* api: API allow cidr network searches of the ARP table * Allow non-encoded / in request I also noticed that all is allowed to be called without device, which the sql query does not support.
This commit is contained in:
committed by
Neil Lathwood
parent
b1483e3d2e
commit
4ab358501d
@@ -1826,6 +1826,7 @@ Retrieve a specific ARP entry or all ARP enties for a device
|
||||
Route: /api/v0/resources/ip/arp/:ip
|
||||
|
||||
- ip is the specific IP you would like to query, if this is all then you need to pass ?device=_hostname_ (or device id)
|
||||
- This may also be a cidr network, for example 192.168.1.0/24
|
||||
|
||||
Input:
|
||||
|
||||
@@ -1834,7 +1835,8 @@ Input:
|
||||
Example:
|
||||
```curl
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/resources/ip/arp/1.1.1.1
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/resources/ip/arp/1.1.1.1?device=localhost
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/resources/ip/arp/192.168.1.0/24
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/resources/ip/arp/all?device=localhost
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
Reference in New Issue
Block a user