mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* docs: Continue to reorganize things Make landing pages for /Installation, /API, etc. Split API out into multiple docs Properly use multi-level navigation Add lower nav buttons (tops are bug so disable for now) Add logo for fanciness Refine index page a bit * Improve API TOC layout * Couple of fixes. * Fix API/API-Docs, assumed it was at the right url.
36 lines
522 B
Markdown
36 lines
522 B
Markdown
source: API/Switching.md
|
|
|
|
### `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
|
|
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/devices/localhost/vlans
|
|
```
|
|
|
|
Output:
|
|
```json
|
|
{
|
|
"status": "ok",
|
|
"count": 0,
|
|
"vlans": [
|
|
{
|
|
"vlan_vlan": "1",
|
|
"vlan_domain": "1",
|
|
"vlan_name": "default",
|
|
"vlan_type": "ethernet",
|
|
"vlan_mtu": null
|
|
}
|
|
]
|
|
}
|
|
```
|