Querying Daily Playback Statistics of a Media Asset
Function
Queries daily playback statistics of a media asset.
Before using this API, you need to submit a service ticket to enable the statistics function to trigger a statistics task.
Playback statistics of the past year can be queried.
URI
GET /v1/{project_id}/asset/daily-summary
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
start_time |
Yes |
String |
Start time of the period to be queried. You can query data of the past year, and the time span for one query cannot exceed 90 days. The format of the start time of the period to be queried is yyyyMMdd000000. |
end_time |
Yes |
String |
End time of the period to be queried. You can query data of the past year, and the time span for one query cannot exceed 90 days. The format of the end time of the period to be queried is yyyyMMdd000000. |
offset |
No |
Integer |
Offset. The records after this offset will be queried. |
limit |
No |
Integer |
Maximum number of records that can be returned. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
User token. This parameter is mandatory when token authentication is used. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
Authorization |
No |
String |
Authentication information. This parameter is mandatory for AK/SK authentication. |
X-Sdk-Date |
No |
String |
Time when the request is sent. This parameter is mandatory for AK/SK authentication. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Total records. |
summary_results |
Array of AssetDailySummaryResult objects |
Log files. |
Parameter |
Type |
Description |
---|---|---|
date |
String |
Playback date. The format is yyyyMMdd000000. |
link |
String |
URL for downloading daily playback statistics files. The validity period is 12 hours. File content format: [Domain name]\t[Media asset ID]\t[Date]\t[Playback traffic]\t[Playback times] Description of playback times statistics:
|
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error description |
Example Requests
None
Example Responses
Status code: 200
The information is returned when the request succeeded.
{ "total" : 1, "summary_results" : [ { "date" : "20231201000000", "link" : "http://cdn-log-user-bj4.obs.cn-north-4.myhuaweicloud.com:80/asset-play-summary/05a8aee14d8026a92fcdc018fe235c2c/20231201-asset-play-summary.gz?AccessKeyId=QXBNBGA2GW9EP2XXOYUN&Expires=1701786544&Signature=fJjkLLU1IBeTwANC0U0wUZuzd%2F8%3D" } ] }
Status code: 400
The information is returned when the request failed.
{ "error_code" : "VOD.10053", "error_msg" : "The request parameter is illegal, illegal field: {xx}." }
Status Codes
Status Code |
Description |
---|---|
200 |
The information is returned when the request succeeded. |
400 |
The information is returned when the request failed. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot