## Fetch all livestreams `client.RealtimeKit.Livestreams.GetAllLivestreams(ctx, appID, params) (*LivestreamGetAllLivestreamsResponse, error)` **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. ### Parameters - `appID string` The app identifier tag. - `params LivestreamGetAllLivestreamsParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `EndTime param.Field[Time]` Query param: Specify the end time range in ISO format to access the live stream. - `ExcludeMeetings param.Field[bool]` Query param: Exclude the RealtimeKit meetings that are livestreamed. - `PageNo param.Field[int64]` Query param: The page number from which you want your page search results to be displayed. - `PerPage param.Field[int64]` Query param: Number of results per page. - `SortOrder param.Field[LivestreamGetAllLivestreamsParamsSortOrder]` Query param: Specifies the sorting order for the results. - `const LivestreamGetAllLivestreamsParamsSortOrderAsc LivestreamGetAllLivestreamsParamsSortOrder = "ASC"` - `const LivestreamGetAllLivestreamsParamsSortOrderDsc LivestreamGetAllLivestreamsParamsSortOrder = "DSC"` - `StartTime param.Field[Time]` Query param: Specify the start time range in ISO format to access the live stream. - `Status param.Field[LivestreamGetAllLivestreamsParamsStatus]` Query param: Specifies the status of the operation. - `const LivestreamGetAllLivestreamsParamsStatusLive LivestreamGetAllLivestreamsParamsStatus = "LIVE"` - `const LivestreamGetAllLivestreamsParamsStatusIdle LivestreamGetAllLivestreamsParamsStatus = "IDLE"` - `const LivestreamGetAllLivestreamsParamsStatusErrored LivestreamGetAllLivestreamsParamsStatus = "ERRORED"` - `const LivestreamGetAllLivestreamsParamsStatusInvoked LivestreamGetAllLivestreamsParamsStatus = "INVOKED"` ### Returns - `type LivestreamGetAllLivestreamsResponse struct{…}` - `Data LivestreamGetAllLivestreamsResponseData` - `ID string` The ID of the livestream. - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `Disabled string` Specifies if the livestream was disabled. - `IngestServer string` The server URL to which the RTMP encoder sends the video and audio data. - `MeetingID string` ID of the meeting. - `Name string` Name of the livestream. - `Paging LivestreamGetAllLivestreamsResponseDataPaging` - `EndOffset int64` - `StartOffset int64` - `TotalCount int64` - `PlaybackURL string` The web address that viewers can use to watch the livestream. - `Status LivestreamGetAllLivestreamsResponseDataStatus` - `const LivestreamGetAllLivestreamsResponseDataStatusLive LivestreamGetAllLivestreamsResponseDataStatus = "LIVE"` - `const LivestreamGetAllLivestreamsResponseDataStatusIdle LivestreamGetAllLivestreamsResponseDataStatus = "IDLE"` - `const LivestreamGetAllLivestreamsResponseDataStatusErrored LivestreamGetAllLivestreamsResponseDataStatus = "ERRORED"` - `const LivestreamGetAllLivestreamsResponseDataStatusInvoked LivestreamGetAllLivestreamsResponseDataStatus = "INVOKED"` - `StreamKey string` Unique key for accessing each livestream. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `Success bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/realtime_kit" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.RealtimeKit.Livestreams.GetAllLivestreams( context.TODO(), "app_id", realtime_kit.LivestreamGetAllLivestreamsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "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 } ```