mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated route url to /api/v0/devices/hostname/vlans
This commit is contained in:
@@ -34,9 +34,7 @@ $app->group('/api', function() use ($app) {
|
||||
$app->get('/:hostname/:type', 'authToken', 'get_graph_generic_by_hostname');//api/v0/devices/$hostname/$type
|
||||
$app->get('/:hostname/ports/:ifname', 'authToken', 'get_port_stats_by_port_hostname');//api/v0/devices/$hostname/ports/$ifName
|
||||
$app->get('/:hostname/ports/:ifname/:type', 'authToken', 'get_graph_by_port_hostname');//api/v0/devices/$hostname/ports/$ifName/$type
|
||||
});
|
||||
$app->group('/vlans', function() use ($app) {
|
||||
$app->get('/:hostname', 'authToken', 'get_vlans');//api/v0/vlans/$hostname
|
||||
$app->get('/:hostname/vlans', 'authToken', 'get_vlans');//api/v0/devices/$hostname/vlans
|
||||
});
|
||||
$app->get('/devices', 'authToken', 'list_devices');//api/v0/devices
|
||||
$app->post('/devices', 'authToken', 'add_device');//api/v0/devices (json data needs to be passed)
|
||||
|
@@ -237,7 +237,7 @@ if ($_SESSION['userlevel'] == '10')
|
||||
<tr>
|
||||
<td>/api</td>
|
||||
<td>/v0</td>
|
||||
<td>/vlans/$hostname</td>
|
||||
<td>/devices/$hostname/vlans</td>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
<li>hostname = the hostname to list vlans for</li>
|
||||
@@ -248,7 +248,7 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><code>curl -X DELETE -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v0/vlans/localhost"</code></td>
|
||||
<td colspan="5"><code>curl -X DELETE -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v0/devices/localhost/vlans"</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user