(Available from version 1.8) This operation returns CDN usage details for the account related to the JSON web token used for API authentication. Defaults: from = last billing date, to = end of current day.
Success
object (account) Data for the account. | |
object The query parameters applied to the request. |
Unauthorized
Forbidden
Not Found
Gone
Unprocessable Entity
// Using cURL curl -H "Authorization: Bearer ${WV_JWT}" \ -H "Content-Type: application/json" \ -X "GET" \ "${WV_HOST}/api/v1.10/usage/accounts"
{- "account": {
- "unique_viewers": 17058,
- "viewing_seconds": 44925498,
- "avg_viewing_seconds": 2634,
- "viewing_bytes": 22886,
- "egress_seconds": 49549,
- "egress_seconds_additional_targets": 345,
- "egress_bytes": 7066810
}, - "limits": {
- "resources": [
- "transcoders",
- "vod_streams"
], - "from": "2021-01-07T00:00:00.000Z",
- "to": "2021-10-05T00:00:00.000Z"
}
}
(Available from version 1.8) This operation returns CDN usage details by country for the account related to the JSON web token used for API authentication. CDN usage is the amount of data that went through every Fastly stream target, including unique viewers, viewing time, and bytes of content.
Success
object (countries) | |
object The query parameters applied to the request. |
Unauthorized
Forbidden
Not Found
Gone
Unprocessable Entity
// Using cURL curl -H "Authorization: Bearer ${WV_JWT}" \ -H "Content-Type: application/json" \ -X "GET" \ "${WV_HOST}/api/v1.10/usage/accounts/countries"
{- "countries": [
- {
- "code": "US",
- "name": "United States",
- "unique_viewers": 1,
- "viewing_seconds": 222,
- "avg_viewing_seconds": 222,
- "viewing_bytes": 12886
}, - {
- "code": "CA",
- "name": "Canada",
- "unique_viewers": 14,
- "viewing_seconds": 222,
- "avg_viewing_seconds": 16,
- "viewing_bytes": 22886
}
], - "limits": {
- "resources": [
- "transcoders",
- "vod_streams"
], - "from": "2021-01-07T00:00:00.000Z",
- "to": "2021-10-05T00:00:00.000Z"
}
}
(Available from version 1.8) This operation returns trend data for the CDN usage of the account related to the JSON web token used for API authentication.
The granularity of sampled data changes based on the from and to query values you use:
Requests made for data within the past 30 days, return the following sample intervals:
Requests made for data beyond the past 30 days, always return sample intervals per hour.
Defaults: from = last billing date, to = end of current day, filter = transcoder and vod streams
Success
object (Array of trends) An array of trend data | |
object The query parameters applied to the request. |
Unauthorized
Forbidden
Not Found
Gone
Unprocessable Entity
// Using cURL curl -H "Authorization: Bearer ${WV_JWT}" \ -H "Content-Type: application/json" \ -X "GET" \ "${WV_HOST}/api/v1.10/usage/accounts/trend"
{- "trend": [
- {
- "sampled_at": "2022-03-01T00:00:00.000Z",
- "unique_viewers": 358,
- "viewing_seconds": 1288800,
- "viewing_bytes": 8483993
}, - {
- "sampled_at": "2022-03-02T00:00:00.000Z",
- "unique_viewers": 75,
- "viewing_seconds": 270000,
- "viewing_bytes": 6937994
}, - {
- "sampled_at": "2022-03-03T00:00:00.000Z",
- "unique_viewers": 400,
- "viewing_seconds": 1440000,
- "viewing_bytes": 3958503
}
], - "limits": {
- "resources": [
- "transcoders",
- "vod_streams"
], - "from": "2022-03-01T00:00:00.000Z",
- "to": "2022-03-05T00:00:00.000Z"
}
}
(Available from version 1.8) This operation returns the number of current viewers between all streams, live and VOD, for the account related to the JSON web token used for API authentication.
Success
Unauthorized
Forbidden
Not Found
Gone
Unprocessable Entity
// Using cURL curl -H "Authorization: Bearer ${WV_JWT}" \ -H "Content-Type: application/json" \ -X "GET" \ "${WV_HOST}/api/v1.10/usage/accounts/live"
{- "account": {
- "id": "tvctq36g",
- "unique_viewers": 7,
- "countries": [
- {
- "code": "US",
- "unique_viewers": 4
}, - {
- "code": "DE",
- "unique_viewers": 3
}
], - "viewer_trend": [
- {
- "sampled_at": "2022-01-26T12:01:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:02:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:03:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:04:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:05:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:06:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:07:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:08:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:09:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:10:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:11:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:12:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:13:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:14:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:15:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:16:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:17:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:18:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:19:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:20:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:21:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:22:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:23:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:24:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:25:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:26:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:27:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:28:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:29:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:30:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:31:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:32:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:33:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:34:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:35:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:36:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:37:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:38:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:39:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:40:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:41:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:42:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:43:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:44:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:45:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:46:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:47:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:48:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:49:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:50:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:51:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:52:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:53:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:54:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:55:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:56:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:57:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:58:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:59:00Z",
- "unique_viewers": 7
}, - {
- "sampled_at": "2022-01-26T12:60:00Z",
- "unique_viewers": 7
}
]
}
}