# Fetch usage for all stream targets (Available from version 1.4) This operation returns detailed CDN usage data for all stream targets in the account. Defaults: from = last billing date, to = end of current day. Endpoint: GET /usage/stream_targets Version: v2.0 ## Query parameters: - `from` (string) 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. T You can also specify last_bill_date. Default: last billing date - `to` (string) 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 - `next_page_key` (string) (Available from version 1.5) Returns a paginated view of results from the HTTP request. Specify a page key ID to indicate which page of the results should be displayed. - `per_page` (integer) For use with the next_page_key parameter. Indicates how many records should be included in a page of results. A valid value is any positive integer. The default and maximum value is 1000. ## Response 200 fields (application/json): - `stream_targets` (object) An array of stream targets and the details of their CDN usage. Example: [{"id":"tvctq36g","name":"My Stream Target","archived":true,"type":"fastly","viewing_seconds":44925498,"viewing_bytes":22886},{"id":"bac1256","name":"My Other Stream Target","archived":false,"type":"fastly","viewing_seconds":593275043,"viewing_bytes":22886}] - `stream_targets.id` (string) The unique alphanumeric string that identifies the stream target. - `stream_targets.name` (string) A descriptive name for the stream target. Maximum 255 characters. - `stream_targets.archived` (boolean) A value of true indicates that the stream target has been removed from Wowza Video. - `stream_targets.type` (string) The type of stream target. Fastly is a Wowza CDN target. Enum: "fastly" - `stream_targets.viewing_seconds` (integer) The total length of time, in seconds, that the stream was played at the target. May be longer than the duration of the stream. - `stream_targets.viewing_bytes` (integer) The amount of content, in bytes, that went through the stream target during the selected time frame. - `pagination` (object) Page information for the results generated by the query. Example: {"payload_version":"2.0","total_records":269,"next_page_key":"2jj8syfl","per_page":10,"total_pages":27} - `pagination.payload_version` (integer) The pagination object version. Example: "2.0" - `pagination.total_records` (integer) The total number of records in the database that match the query. Example: 269 - `pagination.next_page_key` (string) The key ID of the next page of results. Example: "2jj8syfl" - `pagination.per_page` (integer) The number of records included on each page of results. Example: 10 - `pagination.total_pages` (integer) The total number of pages generated by the query. Example: 27 - `limits` (object) The time frame represented in the response. Example: {"from":"2019-11-07T00:00:00.000Z","to":"2019-12-05T00:00:00.000Z"} - `limits.from` (string) The start of the range of time represented in the response. Example: "2019-11-07T00:00:00.000Z" - `limits.to` (string) The end of the range of time represented in the response. Example: "2019-12-05T00:00:00.000Z" ## Response 401 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 403 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 404 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 410 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array) ## Response 422 fields (application/json): - `meta` (object, required) - `meta.status` (integer) - `meta.code` (string) - `meta.title` (string) - `meta.message` (string) - `meta.description` (string) - `meta.links` (array)