Documentation
Server_APIs_v2 Server APIs v2
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • Server APIs v2
  • Streaming control
  • Stop forwarding a stream to CDN

Stop forwarding a stream to CDN

Last updated:2025-01-24 17:55

1 Description

Call this API to stop the stream forwarding. If the specified stream is being forwarded to the CDN Live Broadcasting service, this will stop the forwarding task. Developers need to ensure the forwarding addresses are consistent (parameters can differ) in order to correctly stop the corresponding forwarding task.

After developers Start forwarding a stream to CDN, which means the RTC stream is being forwarded to the specified CDN Live Broadcasting address, if there's no longer a need to forward the stream to CDN, please refer to this document to stop the stream forwarding.

2 Request method and endpoint

  • Request method: GET
  • Request endpoint: https://rtc-api.zego.im/?Action=DeleteCDNTransferRule
  • Transmission protocol: HTTPS
  • Rate limit: 10 requests/second (Testing environment: 5 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
String
Yes
Stream ID.
CDNUrl
String
Yes
The CDN URL for stream forwarding, must be in RTMP format.

When using this parameter, please perform UrlEncode on its content.

Sequence
String
Yes
Request sequence number.
For the same StreamId, within 10 consecutive seconds, the request sequence number must be strictly increasing to avoid operation disorder due to inconsistent request timing on the server side.
If there is no concurrent scenario, it is recommended to use a timestamp (in milliseconds).

4 Samole request

https://rtc-api.zego.im/?Action=DeleteCDNTransferRule
&StreamId=rtc01
&CDNUrl=rtmp%3A%2F%2Fwsdemo.zego.im%2Flivestream%2Frtc01
&Sequence=1617249600002
&<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.

6 Samole response

{
    "Code":0,
    "Message":"ok",
    "RequestId":"4741109603321226039",
    "Data":null
}

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 Handling Suggestions
5000, 5001, 5002, 5006, 30003 Internal error. Please contact ZEGOCLOUD technical support for handling.
5003 Authentication failed. Please check if the signature Signature is correct.
5004 Invalid CDN address. Please check if the request parameter CDNUrl is correct.
5005 Invalid request. Please contact ZEGOCLOUD technical support for handling.
5007, 30002 API call frequency is too high. Please reduce the API request frequency.
30004 Incorrect parameter isTest. Please check if the common request parameter isTest is correct.
30005 Invalid AppId. Please check if the AppId is correct.
30009 Invalid StreamId, stream name is not standardized. Please check if the StreamId conforms to the stream name coding specifications.
Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code