Skip to content

Retrieve API Traffic Statistics

GET
https://mapi.storyblok.com/v1/orgs/me/statistics/:all_traffic

Returns API traffic usage statistics for the organization. Filter the response by date.

  • start_date string

    Start date for traffic statistics. Provide date in YYYY-MM-DD format.

  • end_date string

    End date for traffic statistics. Provide date in YYYY-MM-DD format.

  • group_by string

    Group statistics by day, month, or year. Defaults to month.

  • montly_traffic_limit number

    The organization’s monthly traffic limit.

  • yearly_traffic_limit number

    The organization’s annual traffic limit (monthly limit * 12).

  • traffic_used_this_year number

    The organization’s total annual traffic usage.

  • cumulated_traffic object

    A detailed breakdown of the aggregated traffic usage.

    Show child properties
    • requests_used_last_days number

      API request usage in the last 7 days.

    • total_requests_per_time_period number

      Total API requests during the specified period.

    • total_traffic_per_time_period number

      Total traffic bytes during the specified period.

    • traffic object[]

      Traffic data grouped by date.

      Show child properties
      • date string

        Date in YYYY-MM-DD format.

      • api_requests number

        The number of API requests made on the specified period (day, month, or year).

      • total_bytes number

        The total bandwidth (in bytes) consumed by the API requests on the specified period (day, month, or year).

  • traffic_top_spaces string[]

    Top spaces by traffic usage, grouped by the space_id.

    Show child properties
    • date string

      Date in YYYY-MM-DD format.

    • api_requests number

      The number of API requests made on the specified period (day, month, or year).

    • total_bytes number

      The total bandwidth (in bytes) consumed by the API requests on the specified period (day, month, or year).

  • traffic object[]

    Raw traffic data per space grouped by date

    Show child properties
    • date string

      Date in YYYY-MM-DD format.

    • api_requests number

      The number of API requests made on the specified day of the month.

    • total_bytes number

      The total bandwidth (in bytes) consumed by the API requests on a specific day. When the response is null, the bandwidth hasn’t been calculated yet.

    • space_id number

      The ID of the tracked space.

Example Request

curl "https://mapi.storyblok.com/v1/orgs/me/statistics/all_traffic" \
-H "Authorization: YOUR_OAUTH_TOKEN"
Response Example
{
"montly_traffic_limit": 10000000,
"yearly_traffic_limit": 120000000,
"traffic_used_this_year": 15000000,
"cumulated_traffic": {
"requests_used_last_days": 15000,
"total_requests_per_time_period": 50000,
"total_traffic_per_time_period": 25000000,
"traffic": [
{
"date": "2023-01-01",
"api_requests": 1500,
"total_bytes": 2500000
}
]
},
"traffic_top_spaces": {
"123": [
{
"date": "2023-01-01",
"api_requests": 150,
"total_bytes": 250000
},
{
"date": "2023-01-02",
"api_requests": 180,
"total_bytes": 300000
}
],
"456": [
{
"date": "2023-01-01",
"api_requests": 120,
"total_bytes": 200000
}
],
"other_spaces": [
{
"date": "2023-01-01",
"api_requests": 50,
"total_bytes": 75000
}
]
},
"traffic": [
{
"date": "2023-01",
"api_requests": 150,
"total_bytes": 250000,
"space_id": 789
}
]
}

Was this page helpful?

What went wrong?

This site uses reCAPTCHA and Google's Privacy Policy (opens in a new window) . Terms of Service (opens in a new window) apply.