Account

Operations related to stream analytics for an account.

Fetch usage for an account

(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.

Request
query Parameters
filter
string

Restricts the data that gets returned by filtering on one or more values associated with a field. Construct a filter using a two-part expression that specifies the field on which to filter and the logic to use to filter. Keep in mind the following for account trend filters:

  • The only valid filter is resource.
  • The only valid filter operators are eq with values of transcoders or vod_streams or in with a value of transcoders,vod_streams.
  • Filters use a zero-based index.

For example: filter[0][field]=resource&filter[0][eq]=vod_streams

from
string <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

to
string <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

include
string

Specify the data you want returned in the response. You can send a comma-separated list of values.

Valid value is: trend.

Example: trend

Responses
200

Success

Response Schema: application/json
object (account)

Data for the account.

object

The query parameters applied to the request.

401

Unauthorized

403

Forbidden

404

Not Found

410

Gone

422

Unprocessable Entity

get/usage/account
Request samples
// Using cURL
curl -H "Authorization: Bearer ${WV_JWT}" \
  
  -H "Content-Type: application/json" \
  -X "GET" \
  "${WV_HOST}/api/v1.11/usage/accounts"
Response samples
application/json
{
  • "account": {
    },
  • "limits": {
    }
}

(Deprecated) Fetch stream usage by country for an account

The GET /usage/accounts/countries operation is deprecated and no longer available. To retrieve viewer data for a country, use GET /analytics/viewers/account endpoint.

Request
query Parameters
filter
string

Restricts the data that gets returned by filtering on one or more values associated with a field. Construct a filter using a two-part expression that specifies the field on which to filter and the logic to use to filter. Keep in mind the following for account trend filters:

  • The only valid filter is resource.
  • The only valid filter operators are eq with values of transcoders or vod_streams or in with a value of transcoders,vod_streams.
  • Filters use a zero-based index.

For example: filter[0][field]=resource&filter[0][eq]=vod_streams

from
string <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

to
string <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

Responses
200

Success

Response Schema: application/json
object (countries)
object

The query parameters applied to the request.

401

Unauthorized

403

Forbidden

404

Not Found

410

Gone

422

Unprocessable Entity

get/usage/accounts/countries
Request samples
// Using cURL
curl -H "Authorization: Bearer ${WV_JWT}" \
  
  -H "Content-Type: application/json" \
  -X "GET" \
  "${WV_HOST}/api/v1.11/usage/accounts/countries"
Response samples
application/json
{
  • "countries": [
    ],
  • "limits": {
    }
}

(Deprecated) Fetch trend data for an account

The GET /usage/accounts/trend operation is deprecated and no longer available. To retrieve trend data for an account, use GET /usage/account endpoint.

Request
query Parameters
filter
string

Restricts the data that gets returned by filtering on one or more values associated with a field. Construct a filter using a two-part expression that specifies the field on which to filter and the logic to use to filter. Keep in mind the following for account trend filters:

  • The only valid filter is resource.
  • The only valid filter operators are eq with values of transcoders or vod_streams or in with a value of transcoders,vod_streams.
  • Filters use a zero-based index.

For example: filter[0][field]=resource&filter[0][eq]=vod_streams

from
string <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

to
string <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

Responses
200

Success

Response Schema: application/json
object (Array of trends)

An array of trend data

object

The query parameters applied to the request.

401

Unauthorized

403

Forbidden

404

Not Found

410

Gone

422

Unprocessable Entity

get/usage/accounts/trend
Request samples
// Using cURL
curl -H "Authorization: Bearer ${WV_JWT}" \
  
  -H "Content-Type: application/json" \
  -X "GET" \
  "${WV_HOST}/api/v1.11/usage/accounts/trend"
Response samples
application/json
{
  • "trend": [
    ],
  • "limits": {
    }
}

(Deprecated) Fetch live viewer data for an account

The GET /usage/accounts/live operation is deprecated and no longer available. To retrieve live data for an account, use GET /analytics/viewers/account endpoint.

Responses
200

Success

Response Schema: application/json
object (account)
id
string <int32>

The unique alphanumeric string that identifies the stream target.

unique_viewers
integer <int32>

The total number of unique viewers to download at least one chunk of the stream. A unique viewer is a single IP address; multiple users that share the same IP address are counted once.

object (countries)

An array of viewer countries.

object (Array of viewer trends)

An array of viewer trend data. Returns one data point per minute for the past hour.

401

Unauthorized

403

Forbidden

404

Not Found

410

Gone

422

Unprocessable Entity

get/usage/accounts/live
Request samples
// Using cURL
curl -H "Authorization: Bearer ${WV_JWT}" \
  
  -H "Content-Type: application/json" \
  -X "GET" \
  "${WV_HOST}/api/v1.11/usage/accounts/live"
Response samples
application/json
{
  • "account": {
    }
}