Server APIs v2

Stop recording streams on CDN

Update Time:2021-10-25 17:43

1 Description

Stops recording the specified streams on CDN.

For the server-to-server callback triggered when a recorded file is generated, see Recording completed.

2 Request method and endpoint

  • Request method: GET
  • Request endpoint: https://rtc-api.zego.im/?Action=StopCDNRecord
  • Transmission protocol: HTTPS
  • Rate limit: 20 requests/second

3 Request parameters

Listed below are the parameters specific to this request and part of the public request parameters. For the complete list of public request parameters, see Server APIs public request parameters.

Parameter Type Required Description
StreamId[] Array of String Yes A list of Stream IDs.
Example: StreamId[]=cdn01&StreamId[]=cdn02
Vendor String Yes The CDN provider.
  • Tencent: Tencent Cloud

4 Request example

https://rtc-api.zego.im/?Action=StopCDNRecord
&StreamId[]=cdn01&StreamId[]=cdn02
&Vendor=Tencent
&<Public Request Parameters>

5 Response parameters

Parameter Type Description
Code Number Return code.
Message String Description of the request execution result.
RequestId String Request ID.
Data Object Returned data.
└ Tencent Array of Object Data returned by Tencent Cloud (when Tencent Cloud is the CDN provider).
  └ StreamName String Stream name.
  └ RequestId String A unique Request ID that is returned for every request. This request ID will be required for any troubleshooting on the request.
  └ Code String Error code related to the current stream.
  └ Message String Error message related to the current stream.

6 Response example

{
    "Code":0,
    "Message":"success",
    "Data":{
        "Tencent":[
            {
                "StreamName":"cdn01",
                "RequestId":"d39548da-fbd4-4dce-8023-cfccd28a9963",
                "Code":"",
                "Message":""
            }
        ]
    },
    "RequestId":"4315169065145771656"
}

7 Return codes

Listed below are the return codes related to this API. For the complete list of return codes, see Return codes.

Return code Description
41001 Failed to save live stream.
41002 Failed to save channel.
41003 Live stream does not exist.
41004 Stream no longer exists.
42001 Failed to forbid live stream.
42002 Failed to resume live stream.
43001 Failed to create recording index file.