REST API description: Difference between revisions

Line 190: Line 190:
This example extracts the received bytes of the last second of a specific IP.
This example extracts the received bytes of the last second of a specific IP.


<code>curl --silent -k -u USER:PASSWORD 'https://allegro-mm/API/stats/modules/ip/ips/10.1.2.3' | jq .lastSecond[1]</code>
<pre>curl --silent -k -u USER:PASSWORD 'https://allegro-mm/API/stats/modules/ip/ips/10.1.2.3' | jq .lastSecond[1]</pre>


This example extracts received and transmitted bytes of the last second of a specific IP.
This example extracts received and transmitted bytes of the last second of a specific IP.


<code>curl --silent -k -u USER:PASSWORD 'https://allegro-mm/API/stats/modules/ip/ips/10.1.2.3' | jq '.lastSecond[1] + .lastSecond[3]'</code>
<pre>curl --silent -k -u USER:PASSWORD 'https://allegro-mm/API/stats/modules/ip/ips/10.1.2.3' | jq '.lastSecond[1] + .lastSecond[3]'</pre>


== API parameters ==
== API parameters ==
340

edits