Server APIs v2
  • Server APIs overview
  • Accessing Server APIs
  • Room signaling
  • Stream mixing
  • Streaming moderation
  • Streaming control
  • CDN recording
  • Server callbacks
  • Return codes
  • API testing
  • FAQ
  • Documentation
  • Server APIs v2
  • CDN recording
  • Stop recording streams on CDN

Stop recording streams on CDN

Last updated:2023-05-23 09:45

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
  • Ws: Wangsu

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.
TaskId
String
Task ID. A unique identifier of the recording task.
RequestId
String
Unique request ID. This value is returned on every request. When you need to locate the problem, provide the RequestId for the request.
Code
String
Error code related to the current stream. Please refer to msg for processing, or contact ZEGOCLOUD technical support.
Message
String
Error message related to the current stream.
Ws
Object
Data returned by Ws (when Ws is the CDN provider).
msg
String
Operation result prompt.
http_code
Number
Business operation status.
trace_id
String
Serial number.
call_time
String
The time to initiate the request.
list
Array of Object
A list of processing results for the requested task.
task
String
The format of the recording file.
id
String
Stream ID.
http_code
Number
The operation status of this task, please refer to msg for processing, or contact ZEGOCLOUD technical support.
msg
Object
The operation result prompt for this task.
persistentId
String
The file identifier of the task.

6 Response example

{
    "Code":0,
    "Message":"success",
    "Data":{
        "Tencent":[// This Key only takes effect when the Vendor is Tencent.
            {
                "StreamName":"cdn01",
                "RequestId":"d39548da-fbd4-4dce-8023-cfccd28a9963",
                "Code":"",
                "Message":""
            }
        ],
        "Ws":{// This Key only takes effect when the Vendor is Ws. 
            "call_time":"2022-05-26 11:46:06",
            "http_code":200,
            "list":[
                {
                    "http_code":200,
                    "id":"test",
                    "msg":"success",
                    "persistentId":"202009a378bae528409f87dbe20717415676",
                    "task":"mp4"
                }
            ],
            "msg":null,
            "trace_id":"10021988-6472-4b6d-9f9a-6b5a6d4b6551"
        }
    },
    "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 Solution
0 Request successful. -
2 Output parameter error. -
3 The corresponding permission is not enabled. Please contact ZEGOCLOUD Technical Support.
4 CDN type does not match. Please check the parameter.
5 Configuration error. Please contact ZEGOCLOUD Technical Support.
6 Too many attempts. Please try again later.
7 Authentication failed. Please check the authentication parameter.
1000 Request failed. Please contact ZEGOCLOUD Technical Support.
Page Directory