Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
962 B
Markdown
Raw Permalink Normal View History

2017-11-18 19:19:18 -06:00
### `list_arp`
2020-12-30 09:38:14 -05:00
Retrieve a specific ARP entry or all ARP entries for a device
2017-11-18 19:19:18 -06:00
2019-11-13 02:21:07 +00:00
Route: `/api/v0/resources/ip/arp/:query`
2017-11-18 19:19:18 -06:00
2019-11-13 02:21:07 +00:00
Query can be:
- An IP address
- A MAC address
2019-11-13 02:21:07 +00:00
- A CIDR network (192.168.1.0/24)
- `all` and set ?device=_hostname_ (or device id)
2017-11-18 19:19:18 -06:00
Input:
2019-11-13 02:21:07 +00:00
- device if you specify all for the query then you need to populate this
with the hostname or id of the device.
2017-11-18 19:19:18 -06:00
Example:
2017-11-18 19:19:18 -06:00
```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/192.168.1.0/24
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/resources/ip/arp/all?device=localhost
```
Output:
2017-11-18 19:19:18 -06:00
```json
{
"status": "ok",
"message": "",
2017-11-18 19:19:18 -06:00
"count": 1,
"arp": [
{
"port_id": "229",
"mac_address": "da160e5c2002",
"ipv4_address": "1.1.1.1",
"context_name": ""
}
]
}
```