For the complete documentation index, see llms.txt. This page is also available as Markdown.

Traffic Find By Period

Get a high-granularity list of utilization resources for a certain period

get
Authorizations
AuthorizationstringRequired
Path parameters
contractintegerRequired

Contract number

Pattern: [0-9]{5,10}
periodstringRequired

Period of interest in format YYYY-MM

Example: 2020-01Pattern: ^(\d{4}-\d{2}|null)$
Query parameters
ipbooleanOptional

Provide report grouped by IPs

outputstring · enumOptional

The output format (object, array, CSV or all of them)

Default: allPossible values:
Responses
200

Result data

application/json

Unified traffic schema. The API returns either VDC-level or NIC-level traffic data depending on the endpoint/query. Both shapes share the same envelope; trafficObj will contain either a 'vdc' array, a 'nic' array, or both.

trafficstring[]OptionalExample: ["In/Out,VDC UUID,VDC Name,IP,2019-08-01,2019-08-02,2019-08-03","In,f2c2edf6-49f7-4687-8100-872b4d02ddcc,Main VDC,157.97.107.158,0.7254719333723187,1.2738572908565402,0.3472602190449834"]
get/{contract}/traffic/{period}
GET /billing/{contract}/traffic/{period} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "metadata": {
    "contractId": "31805900",
    "customerId": "112505406",
    "reference": "31805900",
    "period": "2020-01",
    "unit": "Bytes"
  },
  "trafficObj": {
    "vdc": [
      {
        "vdcUUID": "f2c2edf6-49f7-4687-8100-872b4d02ddcc",
        "vdcName": "Main VDC",
        "dates": [
          {
            "Date": "2020-01-01",
            "In": 0.7254719333723187,
            "Out": 0.24987032916396856
          }
        ]
      }
    ],
    "nic": [
      {
        "vdcUUID": "f2c2edf6-49f7-4687-8100-872b4d02ddcc",
        "vdcName": "Main VDC",
        "ip": "157.97.107.158",
        "dates": [
          {
            "Date": "2020-01-01",
            "In": 0.7254719333723187,
            "Out": 0.24987032916396856
          }
        ]
      }
    ]
  },
  "trafficArr": [
    [
      "In/Out",
      "VDC UUID",
      "VDC Name",
      "IP",
      "2019-08-01",
      "2019-08-02",
      "2019-08-03"
    ],
    [
      "In",
      "f2c2edf6-49f7-4687-8100-872b4d02ddcc",
      "Main VDC",
      "157.97.107.158",
      "0.7254719333723187",
      "1.2738572908565402",
      "0.3472602190449834"
    ]
  ],
  "traffic": [
    "In/Out,VDC UUID,VDC Name,IP,2019-08-01,2019-08-02,2019-08-03",
    "In,f2c2edf6-49f7-4687-8100-872b4d02ddcc,Main VDC,157.97.107.158,0.7254719333723187,1.2738572908565402,0.3472602190449834"
  ]
}

Last updated

Was this helpful?