tencent cloud



最后更新时间:2024-03-11 11:06:25

    1. API Description

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

    This API is used to query usage data grouped by room.

    • The queried period cannot exceed 24 hours. If the period spans two different days, the data returned may not be accurate due to a delay in data collection. You can make multiple calls to query the usage on different days.
    • You can use this API to query your historical usage or to reconcile data, but we do not recommend you use it for crucial business logic.
    • The rate limit of this API is one call every 15 seconds.
    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 Params. The value used for this API: DescribeTrtcRoomUsage.
    Version Yes String Common Params. The value used for this API: 2019-07-22.
    Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-guangzhou, ap-singapore.
    SdkAppid Yes Integer The SDKAppID of the room.
    StartTime Yes String The start time in the format of YYYY-MM-DD HH:MM (accurate to the minute).
    EndTime Yes String The end time in the format of YYYY-MM-DD HH:MM. The start and end time cannot be more than 24 hours apart.

    3. Output Parameters

    Parameter Name Type Description
    Data String The usage data grouped by room, in CSV format.
    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 usage data grouped by room

    This example shows you how to query usage data grouped by room.

    Input Example

    POST / HTTP/1.1
    Host: trtc.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeTrtcRoomUsage
    <Common request parameters>
        "StartTime": "2023-01-06 00:00",
        "EndTime": "2023-01-06 10:00",
        "SdkAppid": 1400017192

    Output Example

        "Response": {
            "RequestId": "68fccf1c-c2c7-466a-9f14-1db4bed6054b",
            "Data": "RoomId,Audio,SD,hd,FullHD,2K,4K

    5. Developer Resources


    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
    FailedOperation.SdkAppIdNotExist The application ID does not exist.
    InternalError.DBError An error occurred while querying the database.
    InvalidParameter Parameter error.




    7x24 电话支持