Query streaming list
Updated
Queries current Media Gateway ingress streams.
https://api.agora.io/{region}/v1/projects/{appId}/rtls/ingress/online-streamsThis method queries the current list of ongoing Media Gateway streams, including the associated UID, channel name, stream status, bitrate, and audio and video metrics.
Note
If you specify a channel, the response only contains streams in that channel. Because Agora channel names support special characters, URL-encode the channel name before sending the request.
Path Parameters
regionstringRegion 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.
appIdstringThe 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.
Query Parameters
channelstringThe channel name. If specified, the response only contains streams in the specified channel. URL-encode the channel name before sending the request.
Header Parameters
X-Request-IDstringThe 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.
Response Body
The request succeeded and returned the streaming list.
Response Headers
statusstringRequest status. success means the request succeeds.
dataarray<object>sidstringStreaming session ID. Each stream has a unique SID.
channelstringAgora channel name associated with the streaming key.
uidstringUser UID associated with the streaming key.
urlstringPush address in the $domain/live/$streamkey format.
statusstringStream status. Started means the connection is established and waiting to stream audio and video. Running means the stream is being streamed.
beginAtstringStreaming start time in the 2024-01-01 01:01:01.001 format.
bitrateintegerSource stream bitrate, audio plus video, in Kbps.
videoobjectVideo stream parameters returned when the status is Running.
widthintegerVideo width in pixels.
heightintegerVideo height in pixels.
fpsintegerVideo frame rate in frames per second.
audioobjectAudio stream parameters returned when the status is Running.
channelsintegerNumber of audio channels.
sampleRateintegerAudio sampling rate in Hz.
Request examples
curl --request GET \ --url https://api.agora.io/region/v1/projects/appId/rtls/ingress/online-streams \ --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": "2024-01-01 01:01:01.001", "bitrate": 0, "video": { "width": 0, "height": 0, "fps": 0 }, "audio": { "channels": 0, "sampleRate": 0 } } ]}