Stats

Platform: API

Retrieve your API traffic statistics for the last 24 hours.

Hint: The data returned is as of the previous hour or earlier, it may be delayed from the data displayed in the Console.

Privileges

This API requires the account owner to enable permissions for the credentials in the Console.

  1. Go to Console - Project
  2. Click on the credential that requires the Console API to be enabled.
  3. Scroll down to “Console data privileges”.
  4. Check the desired permissions in “API traffic stats”:
    • “Allow access to overall API traffic stats”, aggregate all projects and credentials, including deleted.
    • “Allow access to API traffic stats by project”, filtered by project parameter.
    • “Allow access to API traffic by stats credential”, filtered by credential parameter.
  5. Click the Save button.

Note: deleted projects or credentials cannot be queried individually (such as using filters project or credential), but their traffic stats are included in the overall aggregation.

Endpoint

/metrics/v1/stats

Parameters

Query parameters

  • projectSpecify a Project ID to get its API traffic stats. Do not pass both project and credential in a single request.
  • credentialSpecify a Credential ID to get its API traffic stats. Do not pass both project and credential a single request.

Request example

curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your_api_host/metrics/v1/stats'

Replace your_token and your_api_host with your JWT Authentication and API Host

Response

The response is in JSON format and is Gzip compressed.

{
  "metadata": {
    "tag": "dcd6183920ebf9f5aa3fd066ed68e61b"
  },
  "asOf": "2025-05-12T02:59Z",
  "success": [
    {
      "api": "Weather",
      "hours": [
        482,
        475,
        520,
        465,
        481,
        485,
        477,
        471,
        518,
        448,
        462,
        461,
        441,
        441,
        512,
        441,
        441,
        441,
        486,
        511,
        582,
        543,
        551,
        525
      ]
    },
    {
      "api": "Geo",
      "hours": [
        20,
        16,
        0,
        15,
        17,
        18,
        18,
        15,
        0,
        4,
        2,
        20,
        0,
        0,
        0,
        0,
        0,
        0,
        17,
        40,
        29,
        21,
        26,
        39
      ]
    },
    {
      "api": "WeatherAlert",
      "hours": [
        436,
        643,
        460,
        507,
        527,
        957,
        716,
        700,
        687,
        1014,
        706,
        557,
        559,
        799,
        280,
        464,
        452,
        764,
        472,
        488,
        496,
        806,
        479,
        556
      ]
    },
    {
      "api": "WeatherIndices",
      "hours": [
        16,
        15,
        0,
        9,
        17,
        16,
        14,
        13,
        0,
        0,
        0,
        10,
        0,
        0,
        0,
        0,
        0,
        0,
        17,
        34,
        29,
        19,
        26,
        29
      ]
    },
    {
      "api": "AirQuality",
      "hours": [
        16,
        15,
        0,
        9,
        17,
        16,
        14,
        13,
        0,
        0,
        0,
        10,
        0,
        0,
        0,
        0,
        0,
        0,
        17,
        34,
        29,
        19,
        26,
        29
      ]
    }
  ],
  "errors": [
    {
      "api": "Weather",
      "hours": [
        3,
        1,
        4,
        3,
        3,
        3,
        3,
        3,
        4,
        0,
        1,
        3,
        3,
        3,
        4,
        3,
        3,
        3,
        3,
        3,
        4,
        3,
        3,
        3
      ]
    },
    {
      "api": "WeatherAlert",
      "hours": [
        0,
        0,
        0,
        0,
        0,
        1,
        1,
        1,
        1,
        0,
        1,
        0,
        0,
        0,
        0,
        4,
        2,
        1,
        1,
        1,
        1,
        1,
        1,
        1
      ]
    }
  ]
}
  • asOf The date and time for this data.
  • success.api API name of the successful requests.
  • success.hours Hourly successful requests stats for the last 24 hours, ending at asOf (e.g., asOf=2025-03-20T09:59Z means the last array item covers 09:00–09:59 UTC).
  • errors.api API name of the error requests.
  • errors.hours Hourly error requests stats for the last 24 hours, ending at asOf (e.g., asOf=2025-03-20T09:59Z means the last array item covers 09:00–09:59 UTC).