GET
/
waap
/
v1
/
statistics
/
series
import os
from datetime import datetime
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
statistics_series = client.waap.statistics.get_usage_series(
    from_=datetime.fromisoformat("2024-12-14T12:00:00"),
    granularity="1h",
    metrics=["total_bytes"],
    to=datetime.fromisoformat("2024-12-14T12:00:00"),
)
print(statistics_series.total_bytes)
{
  "total_bytes": [
    {
      "date_time": "2023-11-07T05:31:56Z",
      "value": 123
    }
  ],
  "total_requests": [
    {
      "date_time": "2023-11-07T05:31:56Z",
      "value": 123
    }
  ]
}

Authorizations

APIKey
string
header
required

API key for authentication.

Query Parameters

from
string
required

Beginning of the requested time period (ISO 8601 format, UTC)

Examples:

"2024-12-14T12:00:00Z"

to
string
required

End of the requested time period (ISO 8601 format, UTC)

Examples:

"2024-12-14T12:00:00Z"

granularity
enum<string>
required

Duration of the time blocks into which the data will be divided.

Available options:
1h,
1d
metrics
enum<string>[]
required

List of metric types to retrieve statistics for.

Response

200
application/json

Successful Response

Response model for the statistics series