Sign up for free

List Live Streams

Sometimes you will want a complete list of all your live stream containers. Sometimes you will want a list to choose a specific live stream container. This guide walks you through how to retrieve this information.

API documentation

Choose an api.video client

The clients offered by api.video include:

Installation

To install your selected client, do the following:

Installing the api.video client
go get github.com/apivideo/api.video-go-client

Create an account

Before you can start streaming, you need to create an api.video account.

Once you are logged in to the Dashboard, select the environment of your choice (sandbox or production) and copy your API key.

List all live streams

You can list all live streams you have to see what's available or send a request that filters your live streams. This code sample shows you how to list all live streams:

Listing all live streams
curl --request GET \
     --url https://ws.api.video/live-streams \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NDI4MTQxNDUuMjE2Mzc2LCJuYmYiOjE2NDI4MTQxNDUuMjE2Mzc2LCJleHAiOjE2NDI4MTc3NDUuMjE2Mzc2LCJwcm9qZWN0SWQiOiJwclJ6SUpKQTdCTHNxSGpTNDVLVnBCMSJ9.GSDqqMzBxo-wOwl9IVbOnzevm8A6LSyaR5kxCWUdkEneSU0kIdoNfhwmXZBq5QWpVa-0GIT8JR59W6npNO-ayhaXmV3LA6EQpvv0mHd_dAhg3N8T96eC0ps0YIrkmw0_Oe6iRgEDI-wJ9nc6tQWi9ybbMHi1LDBjxW4rbFlq7G59C1QZGabd14QO7uqAUUSNqHC1l42z_m7BTK1AhFiBEXmMcfW7X0VmGcaEUy7NiNda8rmq_nrdvkxgN8KHguXzxMsw_4GE_d0eQwHcZvS1q-FebI6b8AoqpoltFOZvUACCrfXH_D_UPshHuJM3apXbD2dg_zQicc8oWBHVGiobLQ'

List a subset of live streams

You can send in a request to filter based on the different parameters for a live stream. You can filter on:

  • streamKey - A string representing the stream key that allows you to stream videos to a specific live stream container

  • name - A string representing the name of your live stream

  • sortBy - A string indicating how you want the results sorted, options include createdAt, publishedAt, name. createdAt - the time a livestream was created using the specified streamKey. publishedAt - the time a livestream was published using the specified streamKey. name - the name of the livestream. If you choose one of the time-based options, the time is presented in ISO-8601 format.

  • sortOrder - A string indicating the order in which to sort everything. Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that latter values precede earlier ones. The title is 0-9 and A-Z ascending and Z-A, 9-0 descending.

  • currentPage - Choose the search results page to return—minimum value: 1.

  • pageSize - Choose the number of results per page. Allowed values: 1-100, default is 25.

Listing a subset of live streams
curl --request GET \
     --url 'https://ws.api.video/live-streams?name=My%20video&currentPage=1&pageSize=25' \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NDI4MjQzMTkuMDk2NjY1LCJuYmYiOjE2NDI4MjQzMTkuMDk2NjY1LCJleHAiOjE2NDI4Mjc5MTkuMDk2NjY1LCJwcm9qZWN0SWQiOiJwclJ6SUpKQTdCTHNxSGpTNDVLVnBCMSJ9.rfchf3btbMTzSukcwhUS0u4fNY4Q3g1JpoMeIz_Dls1ADmqDdKw7yBOE893C7cagb0lpuvUJvhuhgusLStsJ4nqzTveDeM2oPBQBNJjzwaJZNrImTPD4mif7Tzgxvn1_jQJA5L4gQhjd7frCIJW1yAwywrtiDPbxiWNp8fVl7r_QILjZZfslxy-kblPrHJ20Zix9VURqkGIORY5G_457nHSV9Atks1sUlt49E8b_g3jORja3MnznXBS0-0dksz2K62-QMe1_dk78V9JwbLeydqcr15M1jDLA3H6qFGI7GTsTDdZ5jKLhg5OR6yeSHFysqr3kOteTqAGdp3JuTrpZIA'

List live streams using your dashboard

You can also view all your live stream containers from the dashboard. Do the following:

  1. Log in to your dashboard.

  2. From the menu on the left, click Live streams.

  3. On the Live streams screen, you can see all your live streams and filter them by title.

Conclusion

Listing live streams is useful when you're trying to find a particular live stream for your video project.

Was this page helpful?