REST API description: Difference between revisions

Line 215: Line 215:
This example extracts the amount of received and transmitted bytes for an IP address for the last 24 hours.
This example extracts the amount of received and transmitted bytes for an IP address for the last 24 hours.
<pre>
<pre>
$ curl --silent -k -u USER:PASSWORD "https://allegro-mm/API/stats/modules/ip/ips/10.54.0.254?starttime=$(date --date="1 day ago" +%s)&endtime=$(date +%s)&fromCaptureBuffer=true&skiphistorydata=true" | jq '.interval[1] + .interval[3]'
$ curl --silent -k -u USER:PASSWORD "https://allegro-mm/API/stats/modules/ip/ips/10.54.0.254?starttime=$(date --date="1 day ago" +%s)&endtime=$(date +%s)&skiphistorydata=true" | jq '.interval[1] + .interval[3]'
</pre>
</pre>


340

edits