Fetch active livestream session details
client.realtimeKit.livestreams.getActiveLivestreamsForLivestreamId(stringappId, stringlivestreamId, LivestreamGetActiveLivestreamsForLivestreamIDParams { account_id } params, RequestOptionsoptions?): LivestreamGetActiveLivestreamsForLivestreamIDResponse { data, success }
GET/accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}/active-livestream-session
Returns details of all active livestreams for the given livestream ID. Retreive the livestream ID using the Start livestreaming a meeting API.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Fetch active livestream session details
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const response = await client.realtimeKit.livestreams.getActiveLivestreamsForLivestreamId(
'app_id',
'livestream_id',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);
console.log(response.data);{
"data": {
"livestream": {
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"disabled": "disabled",
"ingest_server": "ingest_server",
"meeting_id": "meeting_id",
"name": "name",
"playback_url": "playback_url",
"status": "LIVE",
"stream_key": "stream_key",
"updated_at": "2019-12-27T18:11:19.117Z"
},
"session": {
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"err_message": "err_message",
"ingest_seconds": "ingest_seconds",
"invoked_time": "2019-12-27T18:11:19.117Z",
"livestream_id": "livestream_id",
"started_time": "2019-12-27T18:11:19.117Z",
"stopped_time": "2019-12-27T18:11:19.117Z",
"updated_at": "2019-12-27T18:11:19.117Z",
"viewer_seconds": "viewer_seconds"
}
},
"success": true
}Returns Examples
{
"data": {
"livestream": {
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"disabled": "disabled",
"ingest_server": "ingest_server",
"meeting_id": "meeting_id",
"name": "name",
"playback_url": "playback_url",
"status": "LIVE",
"stream_key": "stream_key",
"updated_at": "2019-12-27T18:11:19.117Z"
},
"session": {
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"err_message": "err_message",
"ingest_seconds": "ingest_seconds",
"invoked_time": "2019-12-27T18:11:19.117Z",
"livestream_id": "livestream_id",
"started_time": "2019-12-27T18:11:19.117Z",
"stopped_time": "2019-12-27T18:11:19.117Z",
"updated_at": "2019-12-27T18:11:19.117Z",
"viewer_seconds": "viewer_seconds"
}
},
"success": true
}