Zone Traffic Resource
Description
Resource for querying zone traffic.
GET /zones/:ID/traffic
Query zone traffic for the specified zone. If used without a query parameter, this query defaults to the last 4 minutes of traffic for the zone.
GET Parameters
| Name | Required | Type | Description | Default Value |
|---|---|---|---|---|
| :ID | Yes | URL Parameter | The unique numeric ID of the zone. | |
| start_time | No | Query Parameter | The start time, in ISO 8601 format, for the zone traffic you want to see. If used you must include an end_time value as well. | |
| end_time | No | Query Parameter | The start time, in ISO 8601 format, for the zone traffic you want to see. If used you must include a start_time value as well. | |
| traffic_type | No | Query Parameter | You can filter what values are returned by traffic type. The type of traffic can be one of any of these values: "all", "ipv4", "ipv6", "tcp", "udp", "icmp", "other", "tcp_syn", "tcp_syn_ack", "tcp_ack", "tcp_fin", "tcp_rst", "ip_frag", "whitelisted" | "all" |
GET Response Values
| Name | Type | Description |
|---|---|---|
| period | JSON Number | This represents the period of time, in milliseconds, covered by each data element. This will default to 30000 (30 seconds), but if longer time ranges are requested or there isn't historical 30 second data, this will change to 5 minutes, 1 hour minute, or 1 day based on the requested start and end times and available data. |
| data | JSON Array | An array containing all of the data of the queried zone traffic. |
| timestamp | JSON Number | The time of the traffic data in UNIX Epoch time. |
| timestamp_text | JSON String | The timestamp converted to ISO 8601 format (UTC). |
| packets_in | JSON Number | The number of packets received that were destined for this zone. |
| packets_clean | JSON Number | The number of clean (non-attack) packets received that were destined for this zone. |
| packets_out | JSON Number | The number of packets forwarded that were destined for this zone. |
| packets_attack | JSON Number | The number of packets that were detected as attacks. This number reflects packets that were both dropped due to attacks and packets that were still forwarded due to their algorithms being in monitor mode. |
| packets_monitored | JSON Number | The number of packets that were detected as attacks due to their algorithms being in monitor mode. |
| packets_dropped | JSON Number | The number of packets that were dropped due to decisions made by algorithms in filter mode. |
| packets_sampled | JSON Number | The number of packets that were dropped for algorithmic sampling purposes. This is separate from "packets_dropped", which are solely due to drop decisions made by algorithms in filter mode. |
| bits_in | JSON Number | The number of bits received that were destined for this zone. |
| bits_clean | JSON Number | The number of clean (non-attack) bits received that were destined for this zone. |
| bits_out | JSON Number | The number of bits forwarded that were destined for this zone. |
| bits_attack | JSON Number | The number of bits that were detected as attacks. This number reflects bits that were both dropped due to attacks and bits that were still forwarded due to their algorithms being in monitor mode. |
| bits_monitored | JSON Number | The number of bits that were detected as attacks due to their algorithms being in monitor mode. |
| bits_dropped | JSON Number | The number of bits that were dropped due to decisions made by algorithms in filter mode. |
| bits_sampled | JSON Number | The number of bits that were dropped for algorithmic sampling purposes. This is separate from "bits_dropped", which are solely due to drop decisions made by algorithms in filter mode. |
Example GET Request
GET /zones/2517/traffic
Example GET Response
{
"period": 3600000,
"data": [
{
"timestamp": 1630526400000,
"timestamp_text": "2021-09-01T20:00:00Z",
"packets_in": 5074553,
"packets_clean": 1575343,
"packets_out": 5074193,
"packets_attack": 3499208,
"packets_monitored": 3499208,
"packets_dropped": 0,
"bits_in": 3466793864,
"bits_clean": 1145519656,
"bits_out": 3466504184,
"bits_attack": 2321274200,
"bits_monitored": 2321274200,
"bits_dropped": 0,
"packets_sampled": 360,
"bits_sampled": 289680
},
{
"timestamp": 1630530000000,
"timestamp_text": "2021-09-01T21:00:00Z",
"packets_in": 5074361,
"packets_clean": 1575442,
"packets_out": 5074001,
"packets_attack": 3498918,
"packets_monitored": 3498918,
"packets_dropped": 0,
"bits_in": 3466659264,
"bits_clean": 1145601336,
"bits_out": 3466369632,
"bits_attack": 2321057928,
"bits_monitored": 2321057928,
"bits_dropped": 0,
"packets_sampled": 360,
"bits_sampled": 289632
},
{
"timestamp": 1630533600000,
"timestamp_text": "2021-09-01T22:00:00Z",
"packets_in": 5074579,
"packets_clean": 1575228,
"packets_out": 5074218,
"packets_attack": 3499351,
"packets_monitored": 3499351,
"packets_dropped": 0,
"bits_in": 3466808056,
"bits_clean": 1145432320,
"bits_out": 3466517856,
"bits_attack": 2321375728,
"bits_monitored": 2321375728,
"bits_dropped": 0,
"packets_sampled": 361,
"bits_sampled": 290200
},
{
"timestamp": 1630537200000,
"timestamp_text": "2021-09-01T23:00:00Z",
"packets_in": 5074623,
"packets_clean": 1575355,
"packets_out": 5074264,
"packets_attack": 3499268,
"packets_monitored": 3499268,
"packets_dropped": 0,
"bits_in": 3466837752,
"bits_clean": 1145521312,
"bits_out": 3466548312,
"bits_attack": 2321316432,
"bits_monitored": 2321316432,
"bits_dropped": 0,
"packets_sampled": 359,
"bits_sampled": 289440
},
{
"timestamp": 1630540800000,
"timestamp_text": "2021-09-02T00:00:00Z",
"packets_in": 5074741,
"packets_clean": 1575535,
"packets_out": 5074382,
"packets_attack": 3499206,
"packets_monitored": 3499206,
"packets_dropped": 0,
"bits_in": 3466926512,
"bits_clean": 1145667192,
"bits_out": 3466636648,
"bits_attack": 2321259320,
"bits_monitored": 2321259320,
"bits_dropped": 0,
"packets_sampled": 359,
"bits_sampled": 289864
}
]
}