Problem getting only some streams

Hello,

even when in video.api reference there is no mention about the liveIds parameter to get only some streams, by seeing PHP SDK, I saw that one can pass an array of ids to retrieve only certain streams, however, this does not work.

For example, I have used this GET request:

https://sandbox.api.video/live-streams?currentPage=1&pageSize=10&liveIds=[li68SvXrK5XeB4NVIbQSQ69M]

I know that li68SvXrK5XeB4NVIbQSQ69M does exist, however, all streams are returned.

For testing, I have called this API:

https://sandbox.api.video/live-streams?currentPage=1&pageSize=10&liveIds=[sdfs]

That should return nothing, however, it returns all streams again.

How can I do it?

Thanks
Jaime

Jaime,

The API endpoint you are looking for is “Get Livestream”:

For your video, the URL would be:
https://sandbox.api.video/live-streams/li68SvXrK5XeB4NVIbQSQ69M

You can just pass one LiveStreamId at a time to this endpoint.

Doug

Doug,

I don’t want to get only one live stream, but all live streams I have in my local database. According to PHP example, I could call live-streams api with a liveIds parameter as the PHP code shows. That liveIds parameter should be an array of live streams. (https://github.com/apivideo/php-sdk/blob/master/src/Api/Lives.php, line 43)

My example is considering just one live stream at the moment, but I need to be able to return 2 or more live streams in a single api call. What PHP SDK shows is perfectly what I need.

By querying my database first and according to that I retrieve certain live streams is faster because I have other data for the videos, for example, a Description field. If I use the callback function and for each returned stream I get the other video data, it could be extremely slow.

Regards
Jaime