tencent cloud

Feedback

DescribeTrtcInteractiveTime

Last updated: 2021-11-09 10:14:15
This document is currently invalid. Please refer to the documentation page of the product.

1. API Description

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

This API is used to query billable audio/video interaction 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: DescribeTrtcInteractiveTime.
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
Usages Array of OneSdkAppIdUsagesInfo 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 audio/video interaction durations for a period longer than 1 day

This example shows you how to query billable audio/video interaction durations for a period longer than 1 day.

Input Example

https://trtc.tencentcloudapi.com/?Action=DescribeTrtcInteractiveTime
&SdkAppId=1400243510
&StartTime=2020-09-07
&EndTime=2020-09-08
&<Common request parameters>

Output Example

{
  "Response": {
    "Usages": [
      {
        "TotalNum": 2,
        "SdkAppId": "1400243510",
        "SdkAppIdTrtcTimeUsages": [
          {
            "AudioVideoTime": 0,
            "VideoTimeSd": 3633229,
            "VideoTimeHd": 7266458,
            "VideoTimeHdp": 10899687,
            "AudioTime": 8435963,
            "TimeKey": "2020-09-07"
          },
          {
            "AudioVideoTime": 0,
            "VideoTimeSd": 8896,
            "VideoTimeHd": 17792,
            "VideoTimeHdp": 26688,
            "AudioTime": 30690,
            "TimeKey": "2020-09-08"
          }
        ]
      }
    ],
    "RequestId": "644956b8-9f7c-44c5-b833-31d91dba1b24"
  }
}

Example2 Querying billable audio/video interaction durations for 1 day

Input Example

https://trtc.tencentcloudapi.com/?Action=DescribeTrtcInteractiveTime
&SdkAppId=1400243510
&StartTime=2020-09-08
&EndTime=2020-09-08
&<Common request parameters>

Output Example

{
  "Response": {
    "Usages": [
      {
        "TotalNum": 2,
        "SdkAppId": "1400243510",
        "SdkAppIdTrtcTimeUsages": [
          {
            "AudioVideoTime": 14706996,
            "VideoTimeSd": 0,
            "VideoTimeHd": 0,
            "VideoTimeHdp": 0,
            "AudioTime": 0,
            "TimeKey": "2020-09-07 09:50:00"
          },
          {
            "AudioVideoTime": 56820,
            "VideoTimeSd": 0,
            "VideoTimeHd": 0,
            "VideoTimeHdp": 0,
            "AudioTime": 0,
            "TimeKey": "2020-09-08 09:55:00"
          }
        ]
      }
    ],
    "RequestId": "644956b8-9f7c-44c5-b833-31d91dba1b24"
  }
}

Example3 Querying billable audio/video interaction durations without passing in SDKAppID

Input Example

https://trtc.tencentcloudapi.com/?Action=DescribeTrtcInteractiveTime
&StartTime=2020-09-08
&EndTime=2020-09-08
&<Common request parameters>

Output Example

{
  "Response": {
    "Usages": [
      {
        "SdkAppId": "total",
        "SdkAppIdTrtcTimeUsages": [
          {
            "TimeKey": "2020-09-08 00:05:00",
            "AudioVideoTime": 512916,
            "VideoTimeSd": 0,
            "VideoTimeHd": 0,
            "VideoTimeHdp": 0,
            "AudioTime": 0
          },
          {
            "TimeKey": "2020-09-08 00:10:00",
            "AudioVideoTime": 523098,
            "VideoTimeSd": 0,
            "VideoTimeHd": 0,
            "VideoTimeHdp": 0,
            "AudioTime": 0
          },
          {
            "TimeKey": "2020-09-08 00:15:00",
            "AudioVideoTime": 512861,
            "VideoTimeSd": 0,
            "VideoTimeHd": 0,
            "VideoTimeHdp": 0,
            "AudioTime": 0
          }
        ],
        "TotalNum": 3
      }
    ],
    "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
InternalError Internal error.
InternalError.DBError An error occurred while querying the database.
InvalidParameter Invalid parameter.
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