Query streaming information
Updated
Queries an ongoing Media Gateway stream by SID.
https://api.agora.io/{region}/v1/projects/{appId}/rtls/ingress/online-streams/{sid}This method queries an ongoing push based on SID.
Note
A streaming session ID is generated for each initiated streaming task. You can obtain the SID by querying the streaming list or by receiving the message notification callback.
Path Parameters
Region for the streaming key or stream. Supported values are na for North America, eu for Europe, ap for Asia except mainland China, and cn for mainland China.
Important
Make sure that:
- The
regionvalue is the same as for the input source stream. - The domain names for setting the
regionparameter and streaming are the same. - The
regionvalue is in lowercase.
na | eu | ap | cnThe app ID provided by Agora to each developer. After creating a project in Agora Console, you can get an app ID. The app ID is a unique identifier for a project.
The streaming session ID. Each initiated streaming task generates a unique SID.
Header Parameters
The UUID (Universally Unique Identifier) of the request. After you pass in this field, the Agora server returns this field in the response header. It is recommended to assign X-Request-ID a value. If omitted, the Agora server automatically generates a UUID and returns it.
6d35d43f-f4c5-4b3a-9df4-8f0d7e1d5f0aResponse Body
application/json
application/json
application/json
Response schema
200The request succeeded and returned stream information.
Request status. success means the request succeeds.
Streaming session ID. Each stream has a unique SID.
Agora channel name associated with the streaming key.
User UID associated with the streaming key.
Push address in the $domain/live/$streamkey format.
Stream status. Started means the connection is established and waiting to stream audio and video. Running means the stream is being streamed.
Started | RunningStreaming start time in the 2024-01-01 01:01:01.001 format.
Source stream bitrate, audio plus video, in Kbps.
Video stream parameters returned when the status is Running.
Video width in pixels.
Video height in pixels.
Video frame rate in frames per second.
Audio stream parameters returned when the status is Running.
Number of audio channels.
Audio sampling rate in Hz.
401The request failed. A 401 (Unauthorized) response status code means the request is not authorized.
Response Headers
The UUID (Universally Unique Identifier) of the request. The value is in the X-Request-ID response header. If a request error occurs, print the value in the log to troubleshoot the problem.
2006d35d43f-f4c5-4b3a-9df4-8f0d7e1d5f0aRequest examples
curl --request GET \
--url https://api.agora.io/region/v1/projects/appId/rtls/ingress/online-streams/sid \
--header 'Accept: application/json' \
--header 'Authorization: Basic 123' \
--header 'X-Request-ID: '
Response example
{ "status": "success", "data": [ { "sid": "string", "channel": "string", "uid": "string", "url": "string", "status": "Running", "beginAt": "string", "bitrate": 0, "video": { "width": 0, "height": 0, "fps": 0 }, "audio": { "channels": 0, "sampleRate": 0 } } ]}