REST API description: Difference between revisions

Jump to navigation Jump to search
Line 192: Line 192:
* lastSecond: Values of the last second.
* lastSecond: Values of the last second.
* intervalPerSecond: Average per second value of the selected time interval. If no interval is specified, this is similar to lastSecond.
* intervalPerSecond: Average per second value of the selected time interval. If no interval is specified, this is similar to lastSecond.
Please note that all counters are Byte counters, not bit counters. You need to multiply the counters by 8 to get the bitrate.


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


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-XXXX/API/stats/modules/ip/ips/10.1.2.3' | jq '.lastSecond[1] + .lastSecond[3]'</code>
<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>


== API parameters ==
== API parameters ==
404

edits

Navigation menu