Collect Information

Get traffic usage

This endpoint retrieves network traffic usage details for the specified KVM VPS.
The api_host parameter, obtained from the "Create AUTH-session" response,
is dynamically set in the URL.
Provide the signature, kvm_id, and valid_until parameters obtained
from the same response to access traffic data.

post/kvm/v2/get/traffic

Request

Request body application/x-www-form-urlencoded

signaturestring

The session signature obtained from the "Create AUTH-session" call.

kvm_idstring

The unique identifier of the KVM VPS to retrieve traffic data for.
This value is specific to your VPS.

valid_untilstring

The expiration timestamp for the session, obtained from the "Create AUTH-session" call.
Ensure that the session is valid and has not expired.

Example request

{
  "signature": "session_signature_98765",
  "kvm_id": "kvm_100200_300400",
  "valid_until": "1737476000"
}

Response

Traffic data retrieved successfully.

statusstring
chart_dailystring

JSON string containing daily traffic chart data.

chart_monthlystring

JSON string containing monthly traffic chart data.

Example response

{
  "status": "success",
  "data": {
    "included_bytes": 4294967296000,
    "days_remaining": 11,
    "last_updated": "1660023630",
    "rx_bytes": "375246297",
    "tx_bytes": "2683044422",
    "rx_packets": "2306591",
    "tx_packets": "21077614"
  },
  "chart_daily": "{\"datasets\":[{\"label\":\"Daily Traffic [GB]\",\"type\":\"bar\",\"borderWidth\":1,\"borderColor\":\"#058\",\"backgroundColor\":\"#058\",\"yAxisID\":\"y\",\"data\":[0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0]}],\"labels\":[\"Jul 10\",\"Jul 11\",\"Jul 12\",\"Jul 13\",\"Jul 14\",\"Jul 15\",\"Jul 16\",\"Jul 17\",\"Jul 18\",\"Jul 19\",\"Jul 20\",\"Jul 21\",\"Jul 22\",\"Jul 23\",\"Jul 24\",\"Jul 25\",\"Jul 26\",\"Jul 27\",\"Jul 28\",\"Jul 29\",\"Jul 30\",\"Jul 31\",\"Aug 01\",\"Aug 01\",\"Aug 02\",\"Aug 03\",\"Aug 04\",\"Aug 05\",\"Aug 06\",\"Aug 07\",\"Aug 08\"]}",
  "chart_monthly": "{\"datasets\":[{\"label\":\"Cumulative Traffic [GB]\",\"type\":\"bar\",\"borderWidth\":1,\"borderColor\":\"#46A546\",\"backgroundColor\":\"#46A546\",\"yAxisID\":\"y\",\"data\":[3,3,3,3,3,3,3,3,4,4,4,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3]},{\"label\":\"Included Traffic [GB]\",\"type\":\"line\",\"borderWidth\":1,\"borderColor\":\"red\",\"backgroundColor\":\"red\",\"yAxisID\":\"y\",\"data\":[4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000,4000]}],\"labels\":[\"Jul 10\",\"Jul 11\",\"Jul 12\",\"Jul 13\",\"Jul 14\",\"Jul 15\",\"Jul 16\",\"Jul 17\",\"Jul 18\",\"Jul 19\",\"Jul 20\",\"Jul 21\",\"Jul 22\",\"Jul 23\",\"Jul 24\",\"Jul 25\",\"Jul 26\",\"Jul 27\",\"Jul 28\",\"Jul 29\",\"Jul 30\",\"Jul 31\",\"Aug 01\",\"Aug 01\",\"Aug 02\",\"Aug 03\",\"Aug 04\",\"Aug 05\",\"Aug 06\",\"Aug 07\",\"Aug 08\"]}"
}

Changes

No recorded changes to this operation across all 1 revision of this API.