pagination is not work in listing of video
in client.stream.list pagination is not working
every time i get same record in each request
first request:
curl -X GET \
"https://api.cloudflare.com/client/v4/accounts/{YOUR_ACCOUNT_ID}/stream" \
-H "Authorization: Bearer {YOUR_API_TOKEN}" \
-H "Content-Type: application/json" \
--data '{"limit": 5, "offset": 0}'
second request:
curl -X GET \
"https://api.cloudflare.com/client/v4/accounts/{YOUR_ACCOUNT_ID}/stream" \
-H "Authorization: Bearer {YOUR_API_TOKEN}" \
-H "Content-Type: application/json" \
--data '{"limit": 5, "offset": 1}'
can anyone help me to get data proper by pagination1 Reply
I don't think that kind of pagination is available for that endpoint. According to the documentation you need to use
start
and/or end
query params to filter the list further. It doesn't have limit
/offset
based pagination.
It will also always show 1000 records or less. So consider if you would even need pagination 🙂
API docs explain it: https://developers.cloudflare.com/api/resources/stream/methods/list/