tencent cloud

Feedback

DescribeRecordStatistic

Last updated: 2021-11-09 10:14:16

1. API Description

Domain name for API request: trtc.tencentcloudapi.com.

This API is used to query billable on-cloud recording durations.

  • If the period queried is 1 day or shorter, the statistics returned are on a 5-minute basis. If the period queried is longer than 1 day, the statistics returned are on a daily basis.
  • The period queried in a request cannot be longer than 31 days.
  • If you query the statistics of the current day, the statistics returned may be inaccurate due to the delay in data collection.
  • In the daily pay-as-you-go mode, bills for a day are generated the next morning. Therefore, we recommend you query the statistics after 9 AM the next day.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

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 parameter. The value used for this API: DescribeRecordStatistic.
Version Yes String Common parameter. The value used for this API: 2019-07-22.
Region Yes String Common parameter. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou
StartTime Yes Date Query start date in the format of YYYY-MM-DD
EndTime Yes Date Query end date in the format of YYYY-MM-DD
The period queried in a request cannot be longer than 31 days.
SdkAppId No Integer Application ID, which is optional. If it is specified, duration statistics for the specified application are returned; otherwise, the total durations of all applications are returned.

3. Output Parameters

Parameter Name Type Description
SdkAppIdUsages Array of SdkAppIdRecordUsage Duration statistics of the queried application(s)
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Querying billable recording durations

Input Example

https://trtc.tencentcloudapi.com/?Action=DescribeRecordStatistic
&SdkAppId=1400123456
&StartTime=2019-10-11
&EndTime=2019-10-13
&<Common request parameters>

Output Example

{
  "Response": {
    "SdkAppIdUsages": [
      {
        "SdkAppId": "1400123456",
        "Usages": [
          {
            "TimeKey": "2019-10-11",
            "Class1VideoTime": 556026,
            "Class2VideoTime": 86361829,
            "Class3VideoTime": 0,
            "AudioTime": 64169044
          },
          {
            "TimeKey": "2019-10-12",
            "Class1VideoTime": 551103,
            "Class2VideoTime": 85103796,
            "Class3VideoTime": 0,
            "AudioTime": 64156599
          },
          {
            "TimeKey": "2019-10-13",
            "Class1VideoTime": 515249,
            "Class2VideoTime": 82982805,
            "Class3VideoTime": 0,
            "AudioTime": 65673394
          }
        ]
      }
    ],
    "RequestId": "644956b8-9f7c-44c5-b833-31d91dba1b24"
  }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

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
AuthFailure.UnRealNameAuthenticated Identity verification has not been completed, so this operation is not allowed.
InternalError Internal error.
InternalError.DBError An error occurred while querying the database.
InvalidParameter Invalid parameter.
InvalidParameter.AppId AppId verification failed.
InvalidParameter.SdkAppId SdkAppId is incorrect.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support