REST API description: Difference between revisions

Jump to navigation Jump to search
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)&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)&fromCaptureBuffer=true&skiphistorydata=true" | jq '.interval[1] + .interval[3]'
</pre>
</pre>


Line 279: Line 279:
=== Parallel pcap analysis ===
=== Parallel pcap analysis ===


The Allegro can process in parallel offline traffic like a pcap file or a ring buffer. In case a parallel PCAP analysis is running, the API call must be given the additional header field <code>"X-AllegroPackets-Multimeter-ID: :1"</code> with the PCAP instance ID.
The Allegro can process in parallel offline traffic like a pcap file or a ring buffer. In case a parallel PCAP analysis is running, the API call must be given either the additional header field <code>"X-AllegroPackets-Multimeter-ID: :1"</code> or the parameter mm-id with the PCAP instance ID.


This allows to extract information of automated pcap uploads.
This allows to extract information of automated pcap uploads.
340

edits

Navigation menu