Skip to content
Start here

Fetch all livestreams

client.realtimeKit.livestreams.getAllLivestreams(stringappId, LivestreamGetAllLivestreamsParams { account_id, end_time, exclude_meetings, 5 more } params, RequestOptionsoptions?): LivestreamGetAllLivestreamsResponse { data, success }
GET/accounts/{account_id}/realtime/kit/{app_id}/livestreams

Returns details of livestreams associated with the given App ID. It includes livestreams created by your App and RealtimeKit meetings that are livestreamed by your App. If you only want details of livestreams created by your App and not RealtimeKit meetings, you can use the exclude_meetings query parameter.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Realtime AdminRealtime
ParametersExpand Collapse
appId: string

The app identifier tag.

maxLength32
params: LivestreamGetAllLivestreamsParams { account_id, end_time, exclude_meetings, 5 more }
account_id: string

Path param: The account identifier tag.

maxLength32
end_time?: string

Query param: Specify the end time range in ISO format to access the live stream.

formatdate-time
exclude_meetings?: boolean

Query param: Exclude the RealtimeKit meetings that are livestreamed.

page_no?: number

Query param: The page number from which you want your page search results to be displayed.

per_page?: number

Query param: Number of results per page.

sort_order?: "ASC" | "DSC"

Query param: Specifies the sorting order for the results.

One of the following:
"ASC"
"DSC"
start_time?: string

Query param: Specify the start time range in ISO format to access the live stream.

formatdate-time
status?: "LIVE" | "IDLE" | "ERRORED" | "INVOKED"

Query param: Specifies the status of the operation.

One of the following:
"LIVE"
"IDLE"
"ERRORED"
"INVOKED"
ReturnsExpand Collapse
LivestreamGetAllLivestreamsResponse { data, success }
data?: Data { id, created_at, disabled, 8 more }
id?: string

The ID of the livestream.

formatuuid
created_at?: string

Timestamp the object was created at. The time is returned in ISO format.

formatdate-time
disabled?: string

Specifies if the livestream was disabled.

ingest_server?: string

The server URL to which the RTMP encoder sends the video and audio data.

meeting_id?: string

ID of the meeting.

name?: string

Name of the livestream.

paging?: Paging { end_offset, start_offset, total_count }
end_offset?: number
start_offset?: number
total_count?: number
playback_url?: string

The web address that viewers can use to watch the livestream.

status?: "LIVE" | "IDLE" | "ERRORED" | "INVOKED"
One of the following:
"LIVE"
"IDLE"
"ERRORED"
"INVOKED"
stream_key?: string

Unique key for accessing each livestream.

updated_at?: string

Timestamp the object was updated at. The time is returned in ISO format.

formatdate-time
success?: boolean

Fetch all livestreams

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.getAllLivestreams('app_id', {
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
});

console.log(response.data);
{
  "data": {
    "id": "3fd739f4-3c41-456e-bfba-6ebd51e16d2d",
    "created_at": "2023-07-15T11:48:34.753Z",
    "disabled": "disabled",
    "ingest_server": "rtmps://live.cloudflare.com:443/live/",
    "meeting_id": "meeting_id",
    "name": "test",
    "paging": {
      "end_offset": 1,
      "start_offset": 1,
      "total_count": 1
    },
    "playback_url": "https://customer-s8oj0c1n5ek8ah1e.cloudflarestream.com/7de6a3fec0f9c05bf1df140950d3a237/manifest/video.m3u8",
    "status": "LIVE",
    "stream_key": "f26566285faca6fbe2e79a73a66rsrrsrrsr3cde23a2bb7dbc6c2c1761b98f4e4",
    "updated_at": "2023-07-15T11:48:34.753Z"
  },
  "success": true
}
Returns Examples
{
  "data": {
    "id": "3fd739f4-3c41-456e-bfba-6ebd51e16d2d",
    "created_at": "2023-07-15T11:48:34.753Z",
    "disabled": "disabled",
    "ingest_server": "rtmps://live.cloudflare.com:443/live/",
    "meeting_id": "meeting_id",
    "name": "test",
    "paging": {
      "end_offset": 1,
      "start_offset": 1,
      "total_count": 1
    },
    "playback_url": "https://customer-s8oj0c1n5ek8ah1e.cloudflarestream.com/7de6a3fec0f9c05bf1df140950d3a237/manifest/video.m3u8",
    "status": "LIVE",
    "stream_key": "f26566285faca6fbe2e79a73a66rsrrsrrsr3cde23a2bb7dbc6c2c1761b98f4e4",
    "updated_at": "2023-07-15T11:48:34.753Z"
  },
  "success": true
}