project

Get API Statistics

Retrieves detailed endpoint call statistics for your project, allowing you to monitor API usage patterns, track frequency of operations, and analyze response codes.

Data Collection

The statistics include:

  • Endpoint paths and HTTP methods
  • Response status codes
  • Call counts per endpoint
  • Warehouse context (when applicable)
  • Timestamps of activity

Time Aggregation

Statistics are aggregated hourly. Within each hour window:

  • An initial entry is created on the first API call
  • Subsequent calls update the existing hourly entry
  • Each hour boundary creates a new aggregation bucket
  • Hours with no API activity have no entries (gaps in data)

Response Format

The response includes timestamp buckets (in UTC) and corresponding endpoint metrics, allowing for time-series analysis of API usage patterns.

Example:

  • 00:00:00-00:16:32: no activity
    • timestamps: []
  • 00:16:32: warehouse created:
    • {timestamps: ["01:00:00"], called_endpoints: [[{"count": 1, "http_route": "POST /management/v1/warehouse", "status_code": 201, "warehouse_id": null, "warehouse_name": null, "created_at": "00:16:32", "updated_at": null}]]}
  • 00:30:00: table created:
    • timestamps: ["01:00:00"], called_endpoints: [[{"count": 1, "http_route": "POST /management/v1/warehouse", "status_code": 201, "warehouse_id": null, "warehouse_name": null, "created_at": "00:16:32", "updated_at": null}, {"count": 1, "http_route": "POST /catalog/v1/{prefix}/namespaces/{namespace}/tables", "status_code": 201, "warehouse_id": "ff17f1d0-90ad-4e7d-bf02-be718b78c2ee", "warehouse_name": "staging", "created_at": "00:30:00", "updated_at": null}]]
  • 00:45:00: table created:
    • timestamps: ["01:00:00"], called_endpoints: [[{"count": 1, "http_route": "POST /management/v1/warehouse", "status_code": 201, "warehouse_id": null, "warehouse_name": null, "created_at": "00:16:32", "updated_at": null}, {"count": 1, "http_route": "POST /catalog/v1/{prefix}/namespaces/{namespace}/tables", "status_code": 201, "warehouse_id": "ff17f1d0-90ad-4e7d-bf02-be718b78c2ee", "warehouse_name": "staging", "created_at": "00:30:00", "updated_at": "00:45:00"}]]
  • 01:00:36: table deleted:
    • timestamps: ["01:00:00","02:00:00"], called_endpoints: [[{"count": 1, "http_route": "POST /management/v1/warehouse", "status_code": 201, "warehouse_id": null, "warehouse_name": null, "created_at": "00:16:32", "updated_at": null},{"count": 1, "http_route": "POST /catalog/v1/{prefix}/namespaces/{namespace}/tables", "status_code": 201, "warehouse_id": "ff17f1d0-90ad-4e7d-bf02-be718b78c2ee", "warehouse_name": "staging", "created_at": "00:30:00", "updated_at": "00:45:00"}],[{"count": 1, "http_route": "DELETE /catalog/v1/{prefix}/namespaces/{namespace}/tables/{table}", "status_code": 200, "warehouse_id": "ff17f1d0-90ad-4e7d-bf02-be718b78c2ee", "warehouse_name": "staging", "created_at": "01:00:36", "updated_at": "null"}]]
post/management/v1/endpoint-statistics

Request

Request body

status-codesinteger[] nullable

Status code filter

Optional filter to only return statistics for requests with specific status codes.

Example request

{
  "range-specifier": {
    "type": "window",
    "end": "2023-12-31T23:59:59Z",
    "interval": "P1D"
  }
}

Response

Endpoint statistics

next-page-tokenstring required

Token to get the next page of results.

Inverse of previous-page-token, see its documentation above.

previous-page-tokenstring required

Token to get the previous page of results.

Endpoint statistics are not paginated through page-limits, we paginate them by stepping through time. By default, the list-statistics endpoint will return all statistics for now() - 1 day to now(). In the request, you can specify a range_specifier to set the end date and step interval. The previous-page-token will then move to the neighboring window. E.g. in the default case of now() and 1 day, it'd be now() - 2 days to now() - 1 day.

timestampsstring[] required

Array of timestamps indicating the time at which each entry in the called_endpoints array is valid.

We lazily create a new statistics entry every hour, in between hours, the existing entry is being updated. If any endpoint is called in the following hour, there'll be an entry in timestamps for the following hour. If not, then there'll be no entry.

Changes

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