Fetch livestream session details using livestream session ID
client.realtimeKit.livestreams.getLivestreamSessionDetailsForSessionId(stringappId, stringlivestreamSessionId, LivestreamGetLivestreamSessionDetailsForSessionIDParams { account_id } params, RequestOptionsoptions?): LivestreamGetLivestreamSessionDetailsForSessionIDResponse { data, success }
GET/accounts/{account_id}/realtime/kit/{app_id}/livestreams/sessions/{livestream-session-id}
Returns livestream session details for the given livestream session ID. Retrieve the livestream_session_idusing the Fetch livestream session details using a session ID 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 livestream session details using livestream session ID
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.getLivestreamSessionDetailsForSessionId(
'app_id',
'livestream-session-id',
{ account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);
console.log(response.data);{
"data": {
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"err_message": "err_message",
"ingest_seconds": 0,
"livestream_id": "livestream_id",
"started_time": "started_time",
"stopped_time": "stopped_time",
"updated_at": "updated_at",
"viewer_seconds": 0
},
"success": true
}Returns Examples
{
"data": {
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"err_message": "err_message",
"ingest_seconds": 0,
"livestream_id": "livestream_id",
"started_time": "started_time",
"stopped_time": "stopped_time",
"updated_at": "updated_at",
"viewer_seconds": 0
},
"success": true
}