v1

latestOpenAPI 3.0.2Terms of Use2026-08-061441681.6 MB
usage

Fetch stream target usage summary

(Available from version 1.4) This operation returns a summary of CDN usage for all stream targets in the account. Defaults: from = last billing date, to = end of current day.

get/usage/stream_targets/summary

Query parameters

fromstring date-time

The start of the range of time you want to view. Specify YYYY-MM-DD HH:00:00 where HH is a 24-hour clock in UTC. The range doesn't include minutes and seconds and rounds minutes up to the hour. The maximum difference between from and to is 90 days. If you set the from query parameter without setting the to query parameter, the data returned will reflect 90 days starting at the from date, or data up to to the current day, whichever is shorter.

You can also specify last_bill_date.

Default: last billing date

tostring date-time

The end of the range of time you want to view. Specify YYYY-MM-DD HH:00:00 where HH is a 24-hour clock in UTC. The range doesn't include minutes and seconds and rounds minutes up to the hour. The maximum difference between from and to is 90 days. If you set the to query parameter without setting the from query parameter, the data returned will be from the past 90 days or from your last invoice date, whichever is shorter.

You can also specify last_bill_date.

Default: end of the current day

Response

Success

Example response

{
  "summary": {
    "viewing_seconds": 67925498,
    "viewing_bytes": 22886,
    "zones": [
      {
        "name": "global",
        "type": "fastly",
        "viewing_bytes": 12886
      }
    ]
  },
  "limits": {
    "from": "2019-11-07T00:00:00.000Z",
    "to": "2019-12-05T00:00:00.000Z"
  }
}