The following shows how to generate the flashlivetraffic-by-time
report using either the Reporting API's Generate a report POST operation or the Get a cacheable report GET operation. Details about each report's supported products, metrics, filters, and available data intervals are also available dynamically by running the API's Get a report type operation, also shown below. See also other available reports.
Report definition
Returns estimated traffic data for traditional Flash Live streams. Applies to traffic tracked by the Event Center.
This report allows you to configure the aggregation interval for each data record. Available interval
values are: MONTH
, WEEK
, DAY
, HOUR
, FIVE_MINUTES
.
Business object: cpcode
Data available for: 90 days
Required products: Event Center
Available metrics
Metric | Description |
---|---|
Data metrics | |
edgeBitsPerSecond | The edge bandwidth for given objects and filters. |
edgeHitsPerSecond | The number of edge requests per second for given objects and filters. |
viewers | The estimated number of concurrent viewers for given objects and filters. |
Summary metrics | |
edgeBitsPerSecondMax | The peak edge bandwidth for given objects and filters. |
edgeBytesTotal | The total volume of edge traffic for given objects and filters. |
edgeHitsPerSecondMax | The peak number of edge requests per second for given objects and filters. |
edgeHitsTotal | The total number of edge requests for given objects and filters. |
viewersMax | The peak estimated number of concurrent viewers for given objects and filters. |
Available filters
Filter | Type | Description |
---|---|---|
Optional filters | ||
stream_port | String | The name or ID of the stream. In order to filter by stream ID only, provide the regular expression $s*12345$, where 12345 is the stream ID. It's also possible to provide full stream name in the filter (for example, event_show@9). This consists of the name you chose for the stream, followed by the unique stream ID, the latter of which is pre-appended with a letter s if Secure Streaming is enabled. Note that in case of dynamic/MBR streams, you need to provide Published Stream Name (the one used while publishing from the encoder). |
POST request
POST /reporting-api/v1/reports/flashlivetraffic-by-time/versions/1/report-data{?start,end,interval}
Sample: /reporting-api/v1/reports/flashlivetraffic-by-time/versions/1/report-data?start=2020-06-26T13%3A40%3A00Z&end=2020-06-26T14%3A00%3A00Z&interval=FIVE_MINUTES
Query parameters
Parameter | Type | Sample | Description |
---|---|---|---|
Required | |||
start | String | 2022-06-23T13:55:00Z | Specifies the start of the reported period as an ISO-8601 timestamp with optional time zone. The report includes data that matches the start value’s timestamp. |
end | String | 2022-06-23T14:15:00Z | Specifies the end of the reported period as an ISO-8601 timestamp with optional time zone. The report excludes any data that matches the end value’s timestamp. |
interval | Enumeration | FIVE_MINUTES | The duration of each data record. Available values: MONTH , WEEK , DAY , HOUR , FIVE_MINUTES . |
JSON request members
Member | Type | Description |
---|---|---|
objectIds | Array | Specifies the set of cpcode values you want to report on. |
objectIds | Enumeration | As an alternative to an array of ID values, specify all as a string for unfiltered data. Either way, objectIds is required. |
metrics | Array | The set of desired metrics. If omitted, the report includes all available metrics. |
filters | Map of Arrays | Specifies a set of custom filters, with each filter's name keying an array with each filter's set of values. |
Request body:
{
"objectIds": [
"55232",
"23433",
"32433"
],
"metrics": [
"edgeBitsPerSecond",
"edgeBitsPerSecondMax",
"edgeBytesTotal",
"edgeHitsPerSecond",
"edgeHitsPerSecondMax",
"edgeHitsTotal",
"viewers",
"viewersMax"
],
"filters": {
"stream_port": [
"7781",
"7782"
]
}
}
GET request
GET /reporting-api/v1/reports/flashlivetraffic-by-time/versions/1/report-data{?start,end,interval,objectIds,allObjectIds,metrics,filters}
Sample: /reporting-api/v1/reports/flashlivetraffic-by-time/versions/1/report-data?start=2020-06-26T13%3A40%3A00Z&end=2020-06-26T14%3A00%3A00Z&interval=FIVE_MINUTES&objectIds=55232,23433,32433&metrics=edgeBitsPerSecond%2CedgeBitsPerSecondMax&filters=stream_port%3D7782%2Cstream_port%3D7783
Query parameters
Parameter | Type | Sample | Description |
---|---|---|---|
Required | |||
start | String | 2022-06-23T13:55:00Z | Specifies the start of the reported period as an ISO-8601 timestamp with optional time zone. The report includes data that matches the start value’s timestamp. |
end | String | 2022-06-23T14:15:00Z | Specifies the end of the reported period as an ISO-8601 timestamp with optional time zone. The report excludes any data that matches the end value’s timestamp. |
interval | Enumeration | FIVE_MINUTES | The duration of each data record. Available values: MONTH , WEEK , DAY , HOUR , FIVE_MINUTES . |
Optional | |||
allObjectIds | Boolean | true | As an alternative to objectIds , enabling this generates a report that includes all IDs available for the cpcode objectType. This parameter is ignored if the request also specifies a set of objectIds. |
objectIds | String | 55232,23433,32433 | As an alternative to allObjectIds , specifies the set of unique IDs for the cpcode objectType you want to report on, formatted as a comma-delimited list. |
metrics | String | edgeBitsPerSecond,edgeBitsPerSecondMax | Specifies a comma-separated list of metrics to include in the report, otherwise all metrics if omitted. The set of available metrics depends on the type of report. URL-encode the entire value in the GET request. |
filters | String | stream_port=7782,stream_port=7783 | Specifies criteria to filter the report's data. The set of available filters depends on the type of report. Separate each filter name and value with an equals (= ) character, and separate various name/value pairs with commas (, ). To specify more than one filter value, repeat the filter name. See the accompanying example for guidance. URL-encode the entire value in the GET request. |
JSON response
Status 200 application/json
Response body:
{
"metadata": {
"name": "flashlivetraffic-by-time",
"version": "1",
"outputType": "FLAT",
"groupBy": [
"startdatetime"
],
"interval": "FIVE_MINUTES",
"start": "2020-06-26T13:40:00Z",
"end": "2020-06-26T14:00:00Z",
"availableDataEnds": null,
"suggestedRetryTime": null,
"rowCount": 4,
"filters": [
{
"name": "stream_port",
"values": [
"7781",
"7782"
]
}
],
"columns": [
{
"name": "groupBy",
"label": "startdatetime"
},
{
"name": "edgeBitsPerSecond",
"label": "Edge Bits/Sec"
},
{
"name": "edgeHitsPerSecond",
"label": "Edge Hits/Sec"
},
{
"name": "viewers",
"label": "Viewers"
}
],
"objectType": "cpcode",
"objectIds": [
"55232",
"23433",
"32433"
]
},
"data": [
{
"startdatetime": "2020-06-26T13:40:00Z",
"edgeBitsPerSecond": "2522.672934",
"edgeHitsPerSecond": "1562.768984",
"viewers": "1656"
},
{
"startdatetime": "2020-06-26T13:45:00Z",
"edgeBitsPerSecond": "4649.81977",
"edgeHitsPerSecond": "4526.274634",
"viewers": "1974"
},
{
"startdatetime": "2020-06-26T13:50:00Z",
"edgeBitsPerSecond": "1258.343952",
"edgeHitsPerSecond": "196.65327",
"viewers": "3092"
},
{
"startdatetime": "2020-06-26T13:55:00Z",
"edgeBitsPerSecond": "677.785691",
"edgeHitsPerSecond": "752.055045",
"viewers": "3686"
}
],
"summaryStatistics": {
"edgeBitsPerSecondMax": {
"value": "4326.830344",
"details": {}
},
"edgeBytesTotal": {
"value": "3711",
"details": {}
},
"edgeHitsPerSecondMax": {
"value": "3533.080034",
"details": {}
},
"edgeHitsTotal": {
"value": "3988",
"details": {}
},
"viewersMax": {
"value": "2984",
"details": {}
}
}
}
CSV response
Status 200 text/csv
Response Body:
#METADATA_START
name,flashlivetraffic-by-time
version,1
source,flashlivetraffic-by-time/versions/1
groupBy,startdatetime
start,2020-06-26T13:40:00Z
end,2020-06-26T14:00:00Z
interval,`FIVE_MINUTES`
availableDataEnds,
suggestedRetryTime,
rowCount,4
objectType,cpcode
objectIds,55232,23433,32433
stream_port,7781,7782
#METADATA_END
#SUMMARYSTATISTICS_START
edgeBitsPerSecondMax,4326.830344
edgeBytesTotal,3711
edgeHitsPerSecondMax,3533.080034
edgeHitsTotal,3988
viewersMax,2984
#SUMMARYSTATISTICS_END
#COLUMNS_START
startdatetime,edgeBitsPerSecond,edgeHitsPerSecond,viewers
#COLUMNS_END
#DATA_START
2020-06-26T13:40:00Z,2522.672934,1562.768984,1656
2020-06-26T13:45:00Z,4649.81977,4526.274634,1974
2020-06-26T13:50:00Z,1258.343952,196.65327,3092
2020-06-26T13:55:00Z,677.785691,752.055045,3686
#DATA_END
Get report details
This sample Get a report type operation gets the same information you need to run the flashlivetraffic-by-time
report as provided in this reference documentation, but available dynamically to your API client application.
GET /reporting-api/v1/reports/flashlivetraffic-by-time/versions/1
Status 200 application/json
Response body:
{
"name": "flashlivetraffic-by-time",
"description": "Returns estimated traffic data for traditional Flash Live streams. Applies to traffic tracked by the Event Center.",
"businessObjectName": "cpcode",
"version": 1,
"status": "PUBLISHED",
"deprecated": false,
"timeBased": true,
"outputType": "FLAT",
"requiredRoles": [
"None"
],
"available": true,
"metrics": [
{
"name": "edgeBitsPerSecond",
"description": "The edge bandwidth for given objects and filters.",
"label": "Edge Bits/Sec",
"unit": "BIT_PER_SECOND",
"summaryStatistic": false
},
{
"name": "edgeBitsPerSecondMax",
"description": "The peak edge bandwidth for given objects and filters.",
"label": "Edge Bits/Sec Maximum",
"unit": "BIT_PER_SECOND",
"summaryStatistic": true
},
{
"name": "edgeHitsPerSecond",
"description": "The number of edge requests per second for given objects and filters.",
"label": "Edge Hits/Sec",
"unit": "COUNT_PER_SECOND",
"summaryStatistic": false
},
{
"name": "edgeHitsPerSecondMax",
"description": "The peak number of edge requests per second for given objects and filters.",
"label": "Edge Hits/Sec Maximum",
"unit": "COUNT_PER_SECOND",
"summaryStatistic": true
},
{
"name": "edgeHitsTotal",
"description": "The total number of edge requests for given objects and filters.",
"label": "Edge Hits Total",
"unit": "COUNT",
"summaryStatistic": true
},
{
"name": "viewers",
"description": "The estimated number of concurrent viewers for given objects and filters.",
"label": "Viewers",
"unit": "COUNT",
"summaryStatistic": false
},
{
"name": "viewersMax",
"description": "The peak estimated number of concurrent viewers for given objects and filters.",
"label": "Viewers Maximum",
"unit": "COUNT",
"summaryStatistic": true
},
{
"name": "edgeBytesTotal",
"description": "The total volume of edge traffic for given objects and filters.",
"label": "Edge Bytes Total",
"unit": "BYTE",
"summaryStatistic": true
}
],
"groupOutlyingValues": {
"enabled": false
},
"groupBy": [
"startdatetime"
],
"filters": [
{
"name": "stream_port",
"type": "string",
"description": "The name or ID of the stream. In order to filter by stream ID only, provide the regular expression $s*12345$, where 12345 is the stream ID. It's also possible to provide full stream name in the filter (for example, event_show@9). This consists of the name you chose for the stream, followed by the unique stream ID, the latter of which is pre-appended with a letter s if Secure Streaming is enabled. Note that in case of dynamic/MBR streams, you need to provide Published Stream Name (the one used while publishing from the encoder).",
"required": false
}
],
"intervals": [
"MONTH",
"WEEK",
"DAY",
"HOUR",
"FIVE_MINUTES"
],
"dataRetentionDays": 90,
"links": [
{
"rel": "self",
"href": "/reporting-api/v1/reports/flashlivetraffic-by-time/versions/1"
},
{
"rel": "versions",
"href": "/reporting-api/v1/reports/flashlivetraffic-by-time/versions"
},
{
"rel": "all-reports",
"href": "/reporting-api/v1/reports"
},
{
"rel": "execute-report",
"href": "/reporting-api/v1/reports/flashlivetraffic-by-time/versions/1/report-data"
}
]
}