ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.25k stars 623 forks source link

Rest Api /v2/vods/list ignoring sort and order parameters #1835

Open cemalgultekin opened 4 years ago

cemalgultekin commented 4 years ago

We are using Enterprise Edition 1.9.0 20191127_1810 on Ubuntu 16.04, When consuming the rest api with a GET request such as below

http://hostname:5080/WebRTCAppEE/rest/v2/vods/list/0/99?order_by=asc&sort_by=name

or

http://hostname:5080/WebRTCAppEE/rest/v2/vods/list/0/99?order_by=desc&sort_by=name

or

http://hostname:5080/WebRTCAppEE/rest/v2/vods/list/0/99?order_by=desc&sort_by=date

we receive the same results. All the vods, are listed in the same order. We currently have less than 99 videos in that list if it helps.

regards

SelimEmre commented 4 years ago

Could you please try as below:

http://hostname:5080/WebRTCAppEE/rest/v2/vods/list/0/99&order_by=desc&sort_by=date http://hostname:5080/WebRTCAppEE/rest/v2/vods/list/0/99&order_by=asc&sort_by=date

http://hostname:5080/WebRTCAppEE/rest/v2/vods/list/0/99&order_by=desc&sort_by=name http://hostname:5080/WebRTCAppEE/rest/v2/vods/list/0/99&order_by=asc&sort_by=name

cemalgultekin commented 4 years ago

I have tried the links you have provided (replacing the hostname with the actual hostname), and I received a 404 error.

cemalgultekin commented 4 years ago

We have updated our software (keeping the configurations) to 1.9.1, however the issue still remains. Also the new feature #640 , is also not working due to it getting the content from the api itself.

timmmmyboy commented 4 years ago

This is an issue for us as well, can't get the API to return a sorted list no matter what field or order we try.

timmmmyboy commented 4 years ago

Actually as an update I see the typo above, first parameter in that example needs to use ?, so http://hostname:5080/WebRTCAppEE/rest/v2/vods/list/0/99?order_by=desc&sort_by=date works for us. What didn't work was using sort_by with any of the fields that the API outputs (I was attempting sort_by=creationDate). Perhaps documentation needs to be a bit clearer there but this works for me.

mekya commented 3 years ago

Sorry for your bad experience. We'll update the doc for that

https://antmedia.io/rest/#/VoD%20Rest%20Service/getVodList