mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Make API docs match current state of API
This commit is contained in:
@@ -67,7 +67,7 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/api</td>
|
||||
<td>/v1</td>
|
||||
<td>/v0</td>
|
||||
<td>/devices/$hostname/ports/$ifName/$type</td>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
@@ -85,10 +85,10 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v1/devices/localhost/ports/eth0/port_bits" > /tmp/graph.png</code></td>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v0/devices/localhost/ports/eth0/port_bits" > /tmp/graph.png</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v1/devices/localhost/ports/eth0/port_bits?width=1024&height=768&from=1405457456&to=1405543856" > /tmp/graph.png</code></td>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v0/devices/localhost/ports/eth0/port_bits?width=1024&height=768&from=1405457456&to=1405543856" > /tmp/graph.png</code></td>
|
||||
</tr>
|
||||
<a name="general_graphs"></a>
|
||||
<tr class="success">
|
||||
@@ -96,7 +96,7 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/api</td>
|
||||
<td>/v1</td>
|
||||
<td>/v0</td>
|
||||
<td>/devices/$hostname/$type</td>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
@@ -113,10 +113,10 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v1/devices/localhost/device_processor" > /tmp/graph.png</code></td>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v0/devices/localhost/device_processor" > /tmp/graph.png</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v1/devices/localhost/device_processor?width=1024&height=768&from=1405457456&to=1405543856" > /tmp/graph.png</code></td>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v0/devices/localhost/device_processor?width=1024&height=768&from=1405457456&to=1405543856" > /tmp/graph.png</code></td>
|
||||
</tr>
|
||||
<a name="port_stats"></a>
|
||||
<tr class="success">
|
||||
@@ -124,7 +124,7 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/api</td>
|
||||
<td>/v1</td>
|
||||
<td>/v0</td>
|
||||
<td>/devices/$hostname/ports/$ifName</td>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
@@ -137,7 +137,7 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v1/devices/localhost/ports/eth0"</code></td>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v0/devices/localhost/ports/eth0"</code></td>
|
||||
</tr>
|
||||
<a name="list"></a>
|
||||
<tr class="success">
|
||||
@@ -145,8 +145,8 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/api</td>
|
||||
<td>/v1</td>
|
||||
<td>/list/devices</td>
|
||||
<td>/v0</td>
|
||||
<td>/devices</td>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
<li>$order = the name of the column to order by</li>
|
||||
@@ -158,10 +158,10 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v1/devices"</code></td>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v0/devices"</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v1/devices?order=hostname&type=all"</code></td>
|
||||
<td colspan="5"><code>curl -H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v0/devices?order=hostname&type=all"</code></td>
|
||||
</tr>
|
||||
<a name="add"></a>
|
||||
<tr class="success">
|
||||
@@ -169,7 +169,7 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/api</td>
|
||||
<td>/v1</td>
|
||||
<td>/v0</td>
|
||||
<td>/devices</td>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
@@ -191,7 +191,7 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><code>curl -X POST -d '{"hostname":"localhost.localdomain","version":"v1","community":"public"}' \<br />-H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v1/devices"</code></td>
|
||||
<td colspan="5"><code>curl -X POST -d '{"hostname":"localhost.localdomain","version":"v0","community":"public"}' \<br />-H "Content-Type: application/json" -H "X-Auth-Token: 91c60e737e342c205be5bba8e2954d27" \<br/> "https://librenms.example.com/api/v0/devices"</code></td>
|
||||
</tr>
|
||||
<a name="delete"></a>
|
||||
<tr class="success">
|
||||
@@ -199,7 +199,7 @@ if ($_SESSION['userlevel'] == '10')
|
||||
</tr>
|
||||
<tr>
|
||||
<td>/api</td>
|
||||
<td>/v1</td>
|
||||
<td>/v0</td>
|
||||
<td>/devices/$hostname</td>
|
||||
<td>
|
||||
<ul class="list-unstyled">
|
||||
@@ -211,7 +211,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/v1/devices/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"</code></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user