DescribeUsageData
1. API Description
Domain name for API request: mps.intl.tencentcloudapi.com.
This API is used to return the daily Media Processing Service (MPS) usage information within the specified query time range.
- MPS statistical data from the last 365 days can be queried.
- The query time span should not exceed 90 days.
A maximum of 100 requests can be initiated per second for this API.
2. Input Parameters
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: DescribeUsageData. |
| Version | Yes | String | Common Params. The value used for this API: 2019-06-12. |
| Region | No | String | Common Params. This parameter is not required for this API. |
| StartTime | Yes | String | Start date. Use ISO date format. |
| EndTime | Yes | String | End date, which must be greater than or equal to the start date. Use the ISO date format. Parameter format: 2019-07-16T06:21:28Z. |
| Types.N | No | Array of String | Media processing task type to query. Default value: Transcode. Valid values: |
| ProcessRegions.N | No | Array of String | Media processing region. Default value: ap-guangzhou. Valid values: |
3. Output Parameters
| Parameter Name | Type | Description |
|---|---|---|
| Data | Array of TaskStatData | MPS statistical data overview, which displays an overview and detailed data of the queried task. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
4. Example
Example1 Querying MPS Usage
This example shows you how to query usage.
Input Example
POST / HTTP/1.1
Host: mps.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeUsageData
<Common request parameters>
{
"EndTime": "2019-07-03T00:00:00+08:00",
"StartTime": "2019-07-02T00:00:00+08:00"
}
Output Example
{
"Response": {
"Data": [
{
"TaskType": "Transcode",
"Summary": [
{
"Time": "2019-07-02T00:00:00+08:00",
"Count": 22,
"Usage": 2200
},
{
"Time": "2019-07-03T00:00:00+08:00",
"Count": 22,
"Usage": 2200
}
],
"Details": [
{
"Specification": "Audio",
"Data": [
{
"Time": "2019-07-02T00:00:00+08:00",
"Count": 1,
"Usage": 10
},
{
"Time": "2019-07-03T00:00:00+08:00",
"Count": 1,
"Usage": 10
}
]
},
{
"Specification": "Standard.H265.4K",
"Data": [
{
"Time": "2019-07-02T00:00:00+08:00",
"Count": 1,
"Usage": 10
},
{
"Time": "2019-07-03T00:00:00+08:00",
"Count": 1,
"Usage": 10
}
]
},
{
"Specification": "TESHD-10.H265.4K",
"Data": [
{
"Time": "2019-07-02T00:00:00+08:00",
"Count": 1,
"Usage": 10
},
{
"Time": "2019-07-03T00:00:00+08:00",
"Count": 1,
"Usage": 10
}
]
}
]
}
],
"RequestId": "requestId"
}
}
5. Developer Resources
SDK
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
- Tencent Cloud SDK 3.0 for Python
- Tencent Cloud SDK 3.0 for Java
- Tencent Cloud SDK 3.0 for PHP
- Tencent Cloud SDK 3.0 for Go
- Tencent Cloud SDK 3.0 for Node.js
- Tencent Cloud SDK 3.0 for .NET
- Tencent Cloud SDK 3.0 for C++
Command Line Interface
6. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.InvalidMpsUser | Operation failed: unauthorized MPS user. |
| FailedOperation.NetWorkError | Operation failed due to a network error. |
| InternalError | Internal error. |
| InvalidParameterValue | Incorrect parameter value. |
| InvalidParameterValue.Service | A service parameter value error occurs. |