- Documentation
- Server APIs v2
- Streaming control
- Get a stream's status on ZEGO RTC Server
Get a stream's status on ZEGO RTC Server
1 Description
Returns the current status of the specified stream on ZEGO's RTC server, which indicates whether the stream exists on the server. This API is only valid for streams published to ZEGO's RTC server but not for streams directly published to CDN or ZEGO's stream mixing server.
We recommend you use the server-to-server callbacks Stream created
and Stream closed
to maintain stream information on your server. This API is provided as an auxiliary method to check the existence of a stream when needed.
Before using this interface for the first time, you need to contact ZEGO technical support to activate it.
2 Request method and endpoint
- Request method: GET
- Request endpoint: https://rtc-api.zego.im/?Action=DescribeRTCStreamState
- Transmission protocol: HTTPS
- Rate limit: 40 requests/second (Testing environment: 10 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. |
Sequence |
String |
Yes |
Request sequence number. Requests must be sent with the request sequence number in ascending order. It is recommended to use a timestamp (in milliseconds) as the request sequence number. |
4 Sample request
https://rtc-api.zego.im/?Action=DescribeRTCStreamState
&StreamId=rtc01
&Sequence=1617249600001
&<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 Sample response
{
"Code":0,
"Message":"ok",
"RequestId":"8010705573805463424",
"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 |
---|---|
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. |
42003 | Batch disable live broadcast failed. |
42004 | Failed to resume live streaming in batches. |
43001 | Failed to create recording index file. |