tencent cloud

文档反馈

DescribeStreamLinkFlowMediaStatistics

最后更新时间:2024-09-09 10:35:13

    1. API Description

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

    This API is used to query the media quality of a StreamLink flow.

    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 Params. The value used for this API: DescribeStreamLinkFlowMediaStatistics.
    Version Yes String Common Params. The value used for this API: 2020-08-28.
    Region No String Common Params. This parameter is not required for this API.
    FlowId Yes String The flow ID.
    Type Yes String Whether to query the inputs or outputs. Valid values: input, output.
    InputOutputId Yes String The input or output ID.
    Pipeline Yes String Whether to query the primary or backup pipeline. Valid values: 0, 1.
    Period Yes String The query interval. Valid values: 5s, 1min, 5min, 15min.
    StartTime Yes String The start time for query, which is 1 hour ago by default. You can query statistics in the last 7 days.
    It must be in UTC format, such as 2020-01-01T12:00:00Z.
    EndTime Yes String The end time for query, which is 1 hour after the start time by default. The longest time range allowed for query is 24 hours.
    It must be in UTC format, such as 2020-01-01T12:00:00Z.

    3. Output Parameters

    Parameter Name Type Description
    Infos Array of FlowMediaInfo A list of the media data.
    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 Request Sample

    Input Example

    POST / HTTP/1.1
    Host: mdc.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: DescribeStreamLinkFlowMediaStatistics
    <Common request parameters>
    
    {
        "FlowId": "0175723949ba0956b92d0bf40cfe",
        "StartTime": "2020-12-10T11:00:00Z",
        "EndTime": "2020-12-10T12:00:00Z",
        "Period": "1min",
        "Type": "input",
        "Pipeline": "0",
        "InputOutputId": "0175723949bb0956b92d0bf40cff"
    }
    

    Output Example

    {
        "Response": {
            "Infos": [
                {
                    "Network": 1208588,
                    "Timestamp": 1607598000,
                    "SessionId": "xx",
                    "Video": [
                        {
                            "Rate": 1038884,
                            "Pid": 256,
                            "SessionId": "xx",
                            "Fps": 62
                        }
                    ],
                    "Audio": [
                        {
                            "Rate": 169704,
                            "Pid": 257,
                            "SessionId": "xx",
                            "Fps": 45
                        }
                    ]
                }
            ],
            "RequestId": "xx"
        }
    }
    

    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.
    InvalidParameter.EndTime Invalid EndTime.
    InvalidParameter.Id Invalid ID.
    InvalidParameter.InputOutputId Invalid InputOutputId.
    InvalidParameter.NotFound No information found.
    InvalidParameter.Period Invalid Period.
    InvalidParameter.Pipeline Invalid Pipeline.
    InvalidParameter.StartTime Invalid StartTime.
    InvalidParameter.Type Invalid Type.