GET /analytics/traffic

Retrieve traffic data

Returns traffic data for a specific IP address over a given time period.

Parameters

NameTypeInDescription
ip
stringqueryThe IP address to retrieve traffic data for
unit*
mbps | ppsqueryThe unit of measurement for traffic data (megabits per second or packets per second)
time*
integerqueryThe time period in seconds for which to retrieve traffic data

Response

200
400
dataobject
intervalinteger

The number of minutes between each data point

trafficarray

Array of traffic data points [timestamp, allowed traffic, dropped traffic]

successboolean

Request

curl -X GET "https://shield.royalehosting.net/api/v2/analytics/traffic" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-organization-id: YOUR_ORG_ID"

Response

{
  "data": {
    "interval": 1,
    "traffic": [
      [
        1724781300,
        40023,
        0
      ],
      [
        1724781360,
        744910,
        0
      ]
    ]
  },
  "success": true
}