mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Updated to use new theme for docs site * Updated theme location * Removed librenms.css * Updated index page + re-added librenms.css * Use built in theme modification * flexbox grid, dump bootstrap * tidy up things * Added path and updated deploy script + mkdocs config * Removed db schmea changes * Updated to install python/pip 3 * Removed pip3 install * Pip3 install * Updated deploy-docs * Updated deploy-docs
1.1 KiB
1.1 KiB
source: API/Switching.md path: blob/master/doc/
list_vlans
Get a list of all VLANs.
Route: /api/v0/resources/vlans
Input:
Example:
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/resources/vlans
Output:
{
"status": "ok",
"vlans": [
{
"vlan_id": "31",
"device_id": "10",
"vlan_vlan": "1",
"vlan_domain": "1",
"vlan_name": "default",
"vlan_type": "ethernet",
"vlan_mtu": null
},
...
],
"count": 100
}
get_vlans
Get a list of all VLANs for a given device.
Route: /api/v0/devices/:hostname/vlans
- hostname can be either the device hostname or id
Input:
Example:
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/devices/localhost/vlans
Output:
{
"status": "ok",
"count": 0,
"vlans": [
{
"vlan_vlan": "1",
"vlan_domain": "1",
"vlan_name": "default",
"vlan_type": "ethernet",
"vlan_mtu": null
}
]
}