メインコンテンツまでスキップ

CDN Usage Report

A CDN usage report provides detailed information about the following:

  • Content Information: This includes the content's title, content ID, streaming type, and when the content was created.
  • CDN Consumed Date: The date when the CDN was consumed.
  • CDN Usage (GB): This is the amount of consumed CDN usage on a specific day.

Here is an example of a CDN report in CSV format for the CDN consumption that occurred during June 2023:

CDN Usage Example

Generate the CDN Report

To generate a CDN report, you can use the following API:

GET /bv/analytics/v1/reports/cdn-usage

This API accepts two query parameters:

Query ParametersDescription
streaming_typeThis specifies the content type you want to generate the report:
- CDN_REPORT_STREAMING_TYPE_LIVE for live events
- CDN_REPORT_STREAMING_TYPE_VOD for VODs
- CDN_REPORT_STREAMING_TYPE_LIVE_TO_VOD for live-to-VOD replays
timeThis specifies the month for the report in the ISO 8601 format (YYYY-MM-01T00:00:00Z). The report will include the total CDN consumption that occurred from the first day 00:00:00 to the last day 23:59:59 of the specified month.

Here's an example of a request in cURL:

curl --request GET
--url 'https://api.one-dev.kkstream.io/bv/analytics/v1/reports/cdn-usage?time=2023-07-01T00%3A00%3A00Z&streaming_type=CDN_REPORT_STREAMING_TYPE_LIVE_TO_VOD'
--header 'Accept: application/json'
--header 'authorization: Bearer <your-api-token>'
--header 'x-bv-org-id: <your-organization-id>'

A successful response will contain a URL for the watch time report:

{
"url": "string"
}

Now you can access your report by navigating to this URL.

note
  • If the report is unavailable (1-2 days after the target month) or the specified month has no consumption occurred, the API will respond with a 404 error.
  • The URL will expire after one hour. If it expires, please use this API again to fetch a new one.