GET /accounts/{account_id}/stream/usage

Retrieve Stream usage analytics for an account. Returns time-series data for Stream billable minutes viewed across all zones in the account. The gateway rewrites this path before forwarding to the backend usage handler.

Servers

Path parameters

Name Type Required Description
account_id String Yes

Standard Cloudflare hex account identifier. The API gateway translates this to an internal numeric ID before forwarding to the backend service.

Query parameters

Name Type Required Description
metrics String No

Comma-separated list of metrics to include in the response. Available metrics depend on the endpoint. Billing usage supports: streamMinutesViewed, rateLimitingRequestsAllowed, loadBalancingQueries, argoAcceleratedBytes, workersRequests, workersKVReads, imageResizingRequests, spectrumBytesTransferred, mediaUniqueTransformations. Stream/media usage supports: streamMinutesViewed.

time_delta String No

Time unit to aggregate usage observations into. Data retention is approximately 18 months. The effective number of data points returned depends on the time range and granularity selected. For example, requesting hourly granularity over 18 months could produce up to ~13,000 data points; use the limit parameter to cap results and be aware that responses may be truncated.

Valid values:

  • "month"
  • "day"
  • "week"
  • "hour"
  • "year"
  • "quarter"

Default value: "hour"

filters String No

Filter expressions to apply to the query. Format: field==value. Multiple filters can be combined.

limit Integer No

Maximum number of data points to return. The actual number of results depends on the interaction between the time range (since/until) and time_delta granularity. Results are truncated to this limit without error if the time range produces more data points than the limit allows.

Default value: 100

until String No

End of the time range for the query (inclusive). ISO 8601 timestamp. Defaults to the current time.

since String No

Start of the time range for the query (inclusive). ISO 8601 timestamp. Defaults to 6 hours before the current time.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.