

Usage REST API Reference Documentation
version v3
http://api.ooyala.com/v3/billing/usage
Introduction
The Usage REST API allows you to retrieve usage statistics for your Ooyala account. These are similar to the usage statistics in Backlot under the Usage subtab of the Account tab. A more in-depth introduction can be found here. The API routes set forth below contain estimated representations of data utilization and may not match billed usage precisely.
The Base URL
The Usage REST API has http://api.ooyala.com/v3/billing/usage as its base URL. Prefix any request with this URL. Thus, an example request might take the form http://api.ooyala.com/v3/billing/usage/period/provider/{pcode}?api_key=...&expires=...&signature=...
Authentication
The Usage REST API uses the same request signing mechanism as the Backlot API for authenticating API calls. So, in addition to the parameters required by each route in this reference, all requests must provide the following extra query parameters:
-
api_key
: The API key associated with the provider. (See Your API Credentials.) -
signature
: The signature of the request. (See General Algorithm for Signing Requests.) -
expires
: The expiration time of the request. (See Setting an Expiration Time on Requests.)
Request Throttling
The Usage REST API allows a maximum of 100 requests per minute per API key. All requests, regardless of whether they were successful or not, are counted towards this maximum. You must manually throttle requests if you need to submit more than 100 requests within one minute.
Changelog
- 2016-03-22
- Metric
transcoded_time
has been replaced byvod_transcoding_time
. - New metrics
live_transcoding_time
andlive_packaging_time
.
- Metric
- 2016-06-30
- Metrics
live_ads_bytes_delivered
&live_ads_transcoding_time
have been added. - V2's Delivery API has been migrated to the usage API.
- Metrics
Single Metric in Time Period
Report of a single metric of a provider within a fixed period of time.
This route returns a report of all the events for the specified
metric
associated with a single provider (identified by
pcode
). The report contains all events within a fixed period of time (specified by
period
and
type
), and split into rollups computed by the time period specified by
breakdownBy
. Each rollup is a 3-length JSON array that contains:
- The provider's code
- The date of the rollup
- The total aggregated value
Theperiod
andtype
params should match according to the following table (otherwise an error is returned):type period day yyyy-MM-dd week yyyy-WW (where WW represents the number of the week, from 0 to 53) month yyyy-MM quarter yyyy-QX (where X represents the number of the quarter, from 1 to 4) year yyyy
get /period/metric/{metric}/provider/{pcode}
This route returns a report of all the events for the specified
metric
associated with a single provider (identified by
pcode
). The report contains all events within a fixed period of time (specified by
period
and
type
), and split into rollups computed by the time period specified by
breakdownBy
. Each rollup is a 3-length JSON array that contains:
- The provider's code
- The date of the rollup
- The total aggregated value
Theperiod
andtype
params should match according to the following table (otherwise an error is returned):type period day yyyy-MM-dd week yyyy-WW (where WW represents the number of the week, from 0 to 53) month yyyy-MM quarter yyyy-QX (where X represents the number of the quarter, from 1 to 4) year yyyy
Backlot request signing authentication.
URI Parameters
-
metric: required (one of vod_bytes_delivered, live_bytes_delivered, vod_transcoding_time, streams, live_transcoding_time, live_packaging_time, live_ads_bytes_delivered, live_ads_transcoding_time)
Name of the metric.
-
pcode: required (string)
A unique identifier for a provider.
Query Parameters
-
period: required (string)
String representing the period.
Example:
2015-01
-
type: required (one of day, week, month, quarter, year)
Type of the period. Must match the "period" param.
-
breakdownBy: (one of none, day, week, month, quarter, year - default: none)
Period of time to break down the data.
-
includeSubAccounts: (boolean - default: false)
Whether to include subaccounts.
HTTP status code 200
Success
Example request
curl -X GET "http://api.ooyala.com/v3/billing/usage/period/vod_bytes_delivered/QLW82IUsk-TEST-73002N7a28dh1?api_key=...&breakdownBy=day&expires=...&includeSubAccounts=true&period=2015-01&type=month&signature=..."
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"status": {
"type": "string",
"minLength": 1
},
"contents": {
"type": "array",
"minItems": 1,
"items": {
"type": "array",
"minItems": 3,
"additionalItems": false,
"items": [
{
"type": "string",
"minimum": 1
},
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
{
"type": "integer",
"minimum": 0
}
]
}
}
},
"required": [
"status",
"contents"
]
}
Example:
{
"status": "success",
"contents": [
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-01",
1979520000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-02",
3057460000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-03",
4083070000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-04",
2957140000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-05",
4713010000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-06",
7429450000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-07",
7834650000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-08",
7627240000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-09",
6974110000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-10",
4665790000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-11",
2893740000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-12",
3051120000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-13",
5713090000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-14",
14179040000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-15",
14775890000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-16",
13596850000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-17",
14356390000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-18",
6340830000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-19",
7095170000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-20",
14411060000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-21",
15458750000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-22",
15907270000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-23",
15677260000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-24",
14331070000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-25",
6426480000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-26",
8217440000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-27",
16692500000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-28",
16248420000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-29",
16512930000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-30",
16922750000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-31",
10365420000000
]
]
}
HTTP status code 400
Bad Request - Some of the parameters are missing invalid or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'period'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user has not enough privileges to query the information of the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The supplied authentication is not authorized to access this resource"}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error, if problems persits please contact the application owner."}


Secured by ooyala-auth
Multiple Metrics in Time Period
Report of multiple metrics of a provider within a fixed period of time.
This route returns, for each metric in the comma-separated list
metricName
, a report of all metric's events associated with a single provider (identified by
pcode
). The report contains all events within a fixed period of time (specified by
period
and
type
), and split into rollups computed by the time period specified by
breakdownBy
. Each rollup is a 3-length JSON array that contains:
- The provider's code
- The date of the rollup
- The total aggregated value
Theperiod
andtype
params should match according to the following table (otherwise an error is returned):type period day yyyy-MM-dd week yyyy-WW (where WW represents the number of the week, from 0 to 53) month yyyy-MM quarter yyyy-QX (where X represents the number of the quarter, from 1 to 4) year yyyy
get /period/provider/{pcode}
This route returns, for each metric in the comma-separated list
metricName
, a report of all metric's events associated with a single provider (identified by
pcode
). The report contains all events within a fixed period of time (specified by
period
and
type
), and split into rollups computed by the time period specified by
breakdownBy
. Each rollup is a 3-length JSON array that contains:
- The provider's code
- The date of the rollup
- The total aggregated value
Theperiod
andtype
params should match according to the following table (otherwise an error is returned):type period day yyyy-MM-dd week yyyy-WW (where WW represents the number of the week, from 0 to 53) month yyyy-MM quarter yyyy-QX (where X represents the number of the quarter, from 1 to 4) year yyyy
Backlot request signing authentication.
URI Parameters
-
pcode: required (string)
Provider's code.
Query Parameters
-
metricName: required (string)
Comma-separated list of metric names.
Example:
vod_bytes_delivered,live_bytes_delivered
-
period: required (string)
String representing the period.
Example:
2015-01
-
type: required (one of day, week, month, quarter, year)
Type of the period. Must match the "period" param.
-
breakdownBy: (one of none, day, week, month, quarter, year - default: none)
Period of time to break down the data.
-
includeSubAccounts: (boolean - default: false)
Whether to include subaccounts.
HTTP status code 200
Success
Example request
curl -X GET "http://api.ooyala.com/v3/billing/usage/period/provider/QLW82IUsk-TEST-73002N7a28dh1?api_key=...&breakdownBy=month&expires=...&includeSubAccounts=false&metricName=vod_bytes_delivered,live_bytes_delivered&period=2015&type=year&signature=..."
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"status": {
"type": "string",
"minLength": 1
},
"contents": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^(vod_transcoded_time|vod_bytes_delivered|live_bytes_delivered|streams|live_transcoding_time|live_packaging_time|live_ads_bytes_delivered|live_ads_transcoding_time)$": {
"type": "array",
"minItems": 1,
"items": {
"type": "array",
"minItems": 3,
"additionalItems": false,
"items": [
{
"type": "string",
"minimum": 1
},
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
{
"type": "integer",
"minimum": 0
}
]
}
}
}
}
},
"required": [
"status",
"contents"
]
}
Example:
{
"status": "success",
"contents": {
"vod_bytes_delivered": [
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-01",
1979520000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-02",
3057460000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-03",
4083070000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-04",
2957140000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-05",
4713010000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-06",
7429450000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-07",
7834650000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-08",
7627240000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-09",
6974110000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-10",
4665790000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-11",
2893740000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-12",
3051120000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-13",
5713090000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-14",
14179040000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-15",
14775890000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-16",
13596850000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-17",
14356390000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-18",
6340830000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-19",
7095170000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-20",
14411060000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-21",
15458750000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-22",
15907270000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-23",
15677260000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-24",
14331070000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-25",
6426480000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-26",
8217440000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-27",
16692500000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-28",
16248420000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-29",
16512930000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-30",
16922750000000
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-31",
10365420000000
]
],
"live_bytes_delivered": [
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-01",
571622006868
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-02",
10074223434636
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-03",
1989385265219
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-04",
3436952737896
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-05",
13786301811743
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-06",
14997977385788
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-07",
15752993722650
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-08",
14107810328549
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-09",
17673362078208
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-10",
2228279302424
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-11",
3124012341433
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-12",
2737540484412
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-13",
23295212968976
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-14",
26478124332524
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-15",
26349603541291
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-16",
24834548734023
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-17",
5689219411112
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-18",
5284307827091
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-19",
24247461380129
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-20",
25272387583168
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-21",
25943173549047
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-22",
24761796486122
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-23",
27653150381427
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-24",
2314933878885
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-25",
3720965156073
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-26",
37531358351420
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-27",
34790806285582
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-28",
34197584425947
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-29",
33035733506891
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-30",
30598924348531
],
[
"QLW82IUsk-TEST-73002N7a28dh1",
"2015-01-31",
3108039245326
]
]
}
}
HTTP status code 400
Bad Request - Some of the parameters are missing invalid or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'period'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user has not enough privileges to query the information of the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The supplied authentication is not authorized to access this resource"}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error, if problems persits please contact the application owner."}


Secured by ooyala-auth
Single Metric in Date Range
Report of a single metric of a provider within a date range.
This route returns a report of all the events for the specified
metric
and associated with a single provider (specified by
pcode
). The report contains all events ingested within the specified date range between
startDate
(inclusive) and
endDate
(exclusive), split into rollups computed by the time period specified by
breakdownBy
. Each rollup contains a
total
field, which represents the aggregated value of all events inside the rollup. For all metrics besides
vod_transcoded_time
, you may include the query parameter
includeSubAccounts
and set that equal to
true
, in order to track sub-accounts.
get /report/metric/{metric}/provider/{pcode}
This route returns a report of all the events for the specified
metric
and associated with a single provider (specified by
pcode
). The report contains all events ingested within the specified date range between
startDate
(inclusive) and
endDate
(exclusive), split into rollups computed by the time period specified by
breakdownBy
. Each rollup contains a
total
field, which represents the aggregated value of all events inside the rollup. For all metrics besides
vod_transcoded_time
, you may include the query parameter
includeSubAccounts
and set that equal to
true
, in order to track sub-accounts.
Backlot request signing authentication.
URI Parameters
-
metric: required (one of vod_bytes_delivered, live_bytes_delivered, vod_transcoding_time, streams, live_transcoding_time, live_packaging_time, live_ads_bytes_delivered, live_ads_transcoding_time)
Name of the metric.
-
pcode: required (string)
A unique identifier for a provider.
Query Parameters
-
startDate: required (string - pattern: ^\d{4}-\d{2}-\d{2}$)
Start date (inclusive). Format: yyyy-MM-dd
-
endDate: required (string - pattern: ^\d{4}-\d{2}-\d{2}$)
End date (exclusive). Format: yyyy-MM-dd
-
breakdownBy: (one of none, day, week, month, quarter, year - default: none)
Period of time to break down the data.
-
includeSubAccounts: (boolean - default: false)
For all metrics besides
vod_transcoded_time
, you may include the query parameterincludeSubAccounts
and set that equal totrue
, in order to track sub-accounts.
HTTP status code 200
Success
Example request
curl -X GET "http://api.ooyala.com/v3/billing/usage/report/vod_bytes_delivered/QLW82IUsk-TEST-73002N7a28dh1?api_key=...&breakdownBy=day&endDate=2015-02-01&expires=...&includeSubAccounts=true&signature=...&startDate=2015-01-01"
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"status": {
"type": "string",
"minLength": 1
},
"contents": {
"type": "object",
"additionalProperties": false,
"properties": {
"breakdown_by": {
"type": "string",
"enum": ["day", "week", "month", "quarter", "year"]
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
},
"items": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"pcode": {
"type": "string",
"minLength": 1
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
},
"total": {
"type": "integer",
"minimum": 0
}
},
"required": ["pcode", "start_date", "end_date", "total"]
}
},
"cut_dates": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^\\d{4}-\\d{2}$": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
}
}
},
"metric_name": {
"type": "string",
"enum": [
"vod_transcoded_time",
"vod_bytes_delivered",
"live_bytes_delivered",
"streams",
"live_transcoding_time",
"live_packaging_time"
]
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
}
},
"required": [
"breakdown_by",
"start_date",
"items",
"cut_dates",
"metric_name",
"end_date"
]
}
},
"required": [
"status",
"contents"
]
}
Example:
{
"status": "success",
"contents": {
"breakdown_by": "day",
"start_date": "2015-01-01T00:00:00",
"items": [
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-01T00:00:00",
"end_date": "2015-01-02T00:00:00",
"total": 1979520000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-02T00:00:00",
"end_date": "2015-01-03T00:00:00",
"total": 3057460000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-03T00:00:00",
"end_date": "2015-01-04T00:00:00",
"total": 4083070000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-04T00:00:00",
"end_date": "2015-01-05T00:00:00",
"total": 2957140000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-05T00:00:00",
"end_date": "2015-01-06T00:00:00",
"total": 4713010000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-06T00:00:00",
"end_date": "2015-01-07T00:00:00",
"total": 7429450000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-07T00:00:00",
"end_date": "2015-01-08T00:00:00",
"total": 7834650000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-08T00:00:00",
"end_date": "2015-01-09T00:00:00",
"total": 7627240000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-09T00:00:00",
"end_date": "2015-01-10T00:00:00",
"total": 6974110000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-10T00:00:00",
"end_date": "2015-01-11T00:00:00",
"total": 4665790000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-11T00:00:00",
"end_date": "2015-01-12T00:00:00",
"total": 2893740000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-12T00:00:00",
"end_date": "2015-01-13T00:00:00",
"total": 3051120000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-13T00:00:00",
"end_date": "2015-01-14T00:00:00",
"total": 5713090000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-14T00:00:00",
"end_date": "2015-01-15T00:00:00",
"total": 14179040000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-15T00:00:00",
"end_date": "2015-01-16T00:00:00",
"total": 14775890000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-16T00:00:00",
"end_date": "2015-01-17T00:00:00",
"total": 13596850000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-17T00:00:00",
"end_date": "2015-01-18T00:00:00",
"total": 14356390000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-18T00:00:00",
"end_date": "2015-01-19T00:00:00",
"total": 6340830000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-19T00:00:00",
"end_date": "2015-01-20T00:00:00",
"total": 7095170000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-20T00:00:00",
"end_date": "2015-01-21T00:00:00",
"total": 14411060000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-21T00:00:00",
"end_date": "2015-01-22T00:00:00",
"total": 15458750000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-22T00:00:00",
"end_date": "2015-01-23T00:00:00",
"total": 15907270000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-23T00:00:00",
"end_date": "2015-01-24T00:00:00",
"total": 15677260000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-24T00:00:00",
"end_date": "2015-01-25T00:00:00",
"total": 14331070000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-25T00:00:00",
"end_date": "2015-01-26T00:00:00",
"total": 6426480000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-26T00:00:00",
"end_date": "2015-01-27T00:00:00",
"total": 8217440000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-27T00:00:00",
"end_date": "2015-01-28T00:00:00",
"total": 16692500000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-28T00:00:00",
"end_date": "2015-01-29T00:00:00",
"total": 16248420000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-29T00:00:00",
"end_date": "2015-01-30T00:00:00",
"total": 16512930000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-30T00:00:00",
"end_date": "2015-01-31T00:00:00",
"total": 16922750000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-31T00:00:00",
"end_date": "2015-02-01T00:00:00",
"total": 10365420000000
}
],
"cut_dates": {},
"metric_name": "vod_bytes_delivered",
"end_date": "2015-02-01T00:00:00"
}
}
HTTP status code 400
Bad Request - Some of the parameters are missing invalid or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'period'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user has not enough privileges to query the information of the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The supplied authentication is not authorized to access this resource"}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error, if problems persits please contact the application owner."}


Secured by ooyala-auth
Multiple Metrics in Date Range
Report of multiple metrics of a provider within a date range.
This route returns, for each metric in the comma-separated list
metricName
, a report of all the metric's events associated with the single provider (specified by
pcode
). All reports contain all events ingested within the specified date range between
startDate
(inclusive) and
endDate
(exclusive), split into rollups computed by the time period specified by
breakdownBy
. Each rollup contains a
total
field, which represents the aggregated value of all events inside the rollup.
get /report/provider/{pcode}
This route returns, for each metric in the comma-separated list
metricName
, a report of all the metric's events associated with the single provider (specified by
pcode
). All reports contain all events ingested within the specified date range between
startDate
(inclusive) and
endDate
(exclusive), split into rollups computed by the time period specified by
breakdownBy
. Each rollup contains a
total
field, which represents the aggregated value of all events inside the rollup.
Backlot request signing authentication.
URI Parameters
-
pcode: required (string)
Provider's code.
Query Parameters
-
metricName: required (string)
Comma-separated list of metric names.
Example:
vod_bytes_delivered,live_bytes_delivered
-
startDate: required (string - pattern: ^\d{4}-\d{2}-\d{2}$)
Start date (inclusive). Format: yyyy-MM-dd
-
endDate: required (string - pattern: ^\d{4}-\d{2}-\d{2}$)
End date (exclusive). Format: yyyy-MM-dd
-
breakdownBy: (one of none, day, week, month, quarter, year - default: none)
Period of time to break down the data.
-
includeSubAccounts: (boolean - default: false)
Whether to include subaccounts.
HTTP status code 200
Success
Example request
curl -X GET "http://api.ooyala.com/v3/billing/usage/report/provider/QLW82IUsk-TEST-73002N7a28dh1?api_key=...&breakdownBy=month&endDate=2015-01-01&expires=...&includeSubAccounts=false&metricName=vod_bytes_delivered,live_bytes_delivered&signature=...&startDate=2014-01-01"
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"status": {
"type": "string",
"minLength": 1
},
"contents": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"breakdown_by": {
"type": "string",
"enum": ["day", "week", "month", "quarter", "year"]
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
},
"items": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"pcode": {
"type": "string",
"minLength": 1
},
"start_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
},
"total": {
"type": "integer",
"minimum": 0
}
},
"required": ["pcode", "start_date", "end_date", "total"]
}
},
"cut_dates": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^\\d{4}-\\d{2}$": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
}
}
},
"metric_name": {
"type": "string",
"enum": [
"vod_transcoded_time",
"vod_bytes_delivered",
"live_bytes_delivered",
"streams",
"live_transcoding_time",
"live_packaging_time",
"live_ads_bytes_delivered",
"live_ads_transcoding_time"
]
},
"end_date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$"
}
},
"required": [
"breakdown_by",
"start_date",
"items",
"cut_dates",
"metric_name",
"end_date"
]
}
}
},
"required": [
"status",
"contents"
]
}
Example:
{
"status": "success",
"contents": [
{
"breakdown_by": "day",
"start_date": "2015-01-01T00:00:00",
"items": [
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-01T00:00:00",
"end_date": "2015-01-02T00:00:00",
"total": 1979520000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-02T00:00:00",
"end_date": "2015-01-03T00:00:00",
"total": 3057460000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-03T00:00:00",
"end_date": "2015-01-04T00:00:00",
"total": 4083070000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-04T00:00:00",
"end_date": "2015-01-05T00:00:00",
"total": 2957140000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-05T00:00:00",
"end_date": "2015-01-06T00:00:00",
"total": 4713010000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-06T00:00:00",
"end_date": "2015-01-07T00:00:00",
"total": 7429450000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-07T00:00:00",
"end_date": "2015-01-08T00:00:00",
"total": 7834650000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-08T00:00:00",
"end_date": "2015-01-09T00:00:00",
"total": 7627240000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-09T00:00:00",
"end_date": "2015-01-10T00:00:00",
"total": 6974110000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-10T00:00:00",
"end_date": "2015-01-11T00:00:00",
"total": 4665790000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-11T00:00:00",
"end_date": "2015-01-12T00:00:00",
"total": 2893740000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-12T00:00:00",
"end_date": "2015-01-13T00:00:00",
"total": 3051120000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-13T00:00:00",
"end_date": "2015-01-14T00:00:00",
"total": 5713090000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-14T00:00:00",
"end_date": "2015-01-15T00:00:00",
"total": 14179040000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-15T00:00:00",
"end_date": "2015-01-16T00:00:00",
"total": 14775890000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-16T00:00:00",
"end_date": "2015-01-17T00:00:00",
"total": 13596850000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-17T00:00:00",
"end_date": "2015-01-18T00:00:00",
"total": 14356390000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-18T00:00:00",
"end_date": "2015-01-19T00:00:00",
"total": 6340830000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-19T00:00:00",
"end_date": "2015-01-20T00:00:00",
"total": 7095170000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-20T00:00:00",
"end_date": "2015-01-21T00:00:00",
"total": 14411060000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-21T00:00:00",
"end_date": "2015-01-22T00:00:00",
"total": 15458750000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-22T00:00:00",
"end_date": "2015-01-23T00:00:00",
"total": 15907270000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-23T00:00:00",
"end_date": "2015-01-24T00:00:00",
"total": 15677260000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-24T00:00:00",
"end_date": "2015-01-25T00:00:00",
"total": 14331070000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-25T00:00:00",
"end_date": "2015-01-26T00:00:00",
"total": 6426480000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-26T00:00:00",
"end_date": "2015-01-27T00:00:00",
"total": 8217440000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-27T00:00:00",
"end_date": "2015-01-28T00:00:00",
"total": 16692500000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-28T00:00:00",
"end_date": "2015-01-29T00:00:00",
"total": 16248420000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-29T00:00:00",
"end_date": "2015-01-30T00:00:00",
"total": 16512930000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-30T00:00:00",
"end_date": "2015-01-31T00:00:00",
"total": 16922750000000
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-31T00:00:00",
"end_date": "2015-02-01T00:00:00",
"total": 10365420000000
}
],
"cut_dates": {},
"metric_name": "vod_bytes_delivered",
"end_date": "2015-02-01T00:00:00"
},
{
"breakdown_by": "day",
"start_date": "2015-01-01T00:00:00",
"items": [
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-01T00:00:00",
"end_date": "2015-01-02T00:00:00",
"total": 571622006868
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-02T00:00:00",
"end_date": "2015-01-03T00:00:00",
"total": 10074223434636
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-03T00:00:00",
"end_date": "2015-01-04T00:00:00",
"total": 1989385265219
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-04T00:00:00",
"end_date": "2015-01-05T00:00:00",
"total": 3436952737896
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-05T00:00:00",
"end_date": "2015-01-06T00:00:00",
"total": 13786301811743
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-06T00:00:00",
"end_date": "2015-01-07T00:00:00",
"total": 14997977385788
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-07T00:00:00",
"end_date": "2015-01-08T00:00:00",
"total": 15752993722650
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-08T00:00:00",
"end_date": "2015-01-09T00:00:00",
"total": 14107810328549
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-09T00:00:00",
"end_date": "2015-01-10T00:00:00",
"total": 17673362078208
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-10T00:00:00",
"end_date": "2015-01-11T00:00:00",
"total": 2228279302424
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-11T00:00:00",
"end_date": "2015-01-12T00:00:00",
"total": 3124012341433
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-12T00:00:00",
"end_date": "2015-01-13T00:00:00",
"total": 2737540484412
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-13T00:00:00",
"end_date": "2015-01-14T00:00:00",
"total": 23295212968976
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-14T00:00:00",
"end_date": "2015-01-15T00:00:00",
"total": 26478124332524
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-15T00:00:00",
"end_date": "2015-01-16T00:00:00",
"total": 26349603541291
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-16T00:00:00",
"end_date": "2015-01-17T00:00:00",
"total": 24834548734023
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-17T00:00:00",
"end_date": "2015-01-18T00:00:00",
"total": 5689219411112
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-18T00:00:00",
"end_date": "2015-01-19T00:00:00",
"total": 5284307827091
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-19T00:00:00",
"end_date": "2015-01-20T00:00:00",
"total": 24247461380129
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-20T00:00:00",
"end_date": "2015-01-21T00:00:00",
"total": 25272387583168
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-21T00:00:00",
"end_date": "2015-01-22T00:00:00",
"total": 25943173549047
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-22T00:00:00",
"end_date": "2015-01-23T00:00:00",
"total": 24761796486122
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-23T00:00:00",
"end_date": "2015-01-24T00:00:00",
"total": 27653150381427
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-24T00:00:00",
"end_date": "2015-01-25T00:00:00",
"total": 2314933878885
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-25T00:00:00",
"end_date": "2015-01-26T00:00:00",
"total": 3720965156073
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-26T00:00:00",
"end_date": "2015-01-27T00:00:00",
"total": 37531358351420
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-27T00:00:00",
"end_date": "2015-01-28T00:00:00",
"total": 34790806285582
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-28T00:00:00",
"end_date": "2015-01-29T00:00:00",
"total": 34197584425947
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-29T00:00:00",
"end_date": "2015-01-30T00:00:00",
"total": 33035733506891
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-30T00:00:00",
"end_date": "2015-01-31T00:00:00",
"total": 30598924348531
},
{
"pcode": "QLW82IUsk-TEST-73002N7a28dh1",
"start_date": "2015-01-31T00:00:00",
"end_date": "2015-02-01T00:00:00",
"total": 3108039245326
}
],
"cut_dates": {},
"metric_name": "live_bytes_delivered",
"end_date": "2015-02-01T00:00:00"
}
]
}
HTTP status code 400
Bad Request - Some of the parameters are missing invalid or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'period'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user has not enough privileges to query the information of the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The supplied authentication is not authorized to access this resource"}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error, if problems persits please contact the application owner."}


Secured by ooyala-auth
Given Asset in Date Range
Delivery report for a given asset within a date range
This route returns, for the
embed_code
specified in the path, a report of the VOD bytes delivered within the given period. The delivery is split into rollups computed by the time period specified by
breakdown_by
. Each rollup contains a
bytes_delivered
field which is the aggregated value of all the delivery inside the rollup. If there's no delivery inside the rollup this field will be missing.
get /reports/asset/{embed_code}/delivery/total/{date_range}
This route returns, for the
embed_code
specified in the path, a report of the VOD bytes delivered within the given period. The delivery is split into rollups computed by the time period specified by
breakdown_by
. Each rollup contains a
bytes_delivered
field which is the aggregated value of all the delivery inside the rollup. If there's no delivery inside the rollup this field will be missing.
Backlot request signing authentication.
URI Parameters
-
date_range: required (string - pattern: ^\d{4}-\d{2}-\d{2}(...\d{4}-\d{2}-\d{2})?$)
Date range for the request. It can be a single date (start_date) or a open-closed interval [start_date, end_date).
-
embed_code: required (string)
Embed code of the asset which delivery is being requested.
Query Parameters
-
breakdown_by: (one of day, month)
Period of time to break down the data. If ommited, the response will slighltly change. For instance:
{ "results": [{ "id": "total", "metrics": { "bytes_delivered": 522 } }] }
HTTP status code 200
Success
Example request
curl -X GET "http://api.ooyala.com/v3/billing/usage/reports/asset/MwMW10MDE6d8PlNAOestKVKZ4KkyQAh9/delivery/total/2016-04-08...2016-04-12?api_key=...&breakdown_by=day&expiration=...&signature=..."
Body
Type: application/json
Example:
{
"results": {
"total": [
{
"num_days": "1",
"date": "2016-04-08",
"metrics": {}
}, {
"num_days": "1",
"date": "2016-04-09",
"metrics": {
"bytes_delivered": 261316
}
}, {
"num_days": "1",
"date": "2016-04-10",
"metrics": {}
}, {
"num_days": "1",
"date": "2016-04-11",
"metrics": {
"bytes_delivered": 261316
}
}
]
}
}
HTTP status code 400
Bad Request - Some of the parameters are missing invalid or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'period'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user has not enough privileges to query the information of the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The supplied authentication is not authorized to access this resource"}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error, if problems persits please contact the application owner."}


Secured by ooyala-auth
Current API Key in Date Range
Delivery report for the owner of the current api_key within a date range
This route returns, for the provider making the request, a report of the VOD bytes delivered within the given period. The delivery is split into rollups computed by the time period specified by
breakdown_by
. Each rollup contains a
bytes_delivered
field which is the aggregated value of all the delivery inside the rollup. If there's no delivery inside the rollup this field will be missing.
get /reports/account/delivery/total/{date_range}
This route returns, for the provider making the request, a report of the VOD bytes delivered within the given period. The delivery is split into rollups computed by the time period specified by
breakdown_by
. Each rollup contains a
bytes_delivered
field which is the aggregated value of all the delivery inside the rollup. If there's no delivery inside the rollup this field will be missing.
Backlot request signing authentication.
URI Parameters
-
date_range: required (string - pattern: ^\d{4}-\d{2}-\d{2}(...\d{4}-\d{2}-\d{2})?$)
Date range for the request. It can be a single date (start_date) or a open-closed interval [start_date, end_date).
Query Parameters
-
breakdown_by: (one of day, month)
Period of time to break down the data. If ommited, the response will slighltly change. For instance:
{ "results": [{ "id": "total", "metrics": { "bytes_delivered": 522 } }] }
HTTP status code 200
Success
Example request
curl -X GET "http://api.ooyala.com/v3/billing/usage/reports/account/delivery/total/2016-01-01...2016-01-03?api_key=...&breakdown_by=day&expiration=...&signature=..."
Body
Type: application/json
Example:
{
"results": {
"total": [
{
"num_days": "1",
"date": "2016-01-01",
"metrics": {
"bytes_delivered": 13628061
}
}, {
"num_days": "1",
"date": "2016-01-02",
"metrics": {
"bytes_delivered": 41728193
}
}
]
}
}
HTTP status code 400
Bad Request - Some of the parameters are missing invalid or malformed.
Body
Type: application/json
Example:
{"status": "error", "cause": "Request is missing required query parameter 'period'"}
HTTP status code 401
Unauthorized - The supplied credentials are not valid.
Body
Type: application/json
Example:
{"message":"Invalid API key."}
HTTP status code 403
Forbidden - The user has not enough privileges to query the information of the specified provider.
Body
Type: application/json
Example:
{"status": "error", "cause": "The supplied authentication is not authorized to access this resource"}
HTTP status code 500
Server Error - Something is wrong with the API and it might be internittently unavailable.
Body
Type: application/json
Example:
{"status":"error","cause":"There was an unexpected error, if problems persits please contact the application owner."}

