WordPress API returns empty page when page is less than X-WP-TotalPages
Question
I am querying in the WordPress API for all pages of media attachments.
I am going page by page.
I have about 5800 pages and when I hit pages 50-53 they return a blank or more of a []
but it is a 200 HTTP Status
.
Can this be normal with anything that’s paginated? Am I possibly going to be missing data between pages 50-53?
my HTTP GET request for each page:
GET /wp-json/wp/v2/media?page=<page>& per_page=100& key=<test>& orderby=id& order=asc HTTP/1.1
Referer: http://<website>.com/wp-json/wp/v2/media?page=53&per_page=100&key=<key>&orderby=id&order=asc
Connection: keep-alive
0
curl, media, pagination, rest-api, wp-api
4 years
2019-10-01T12:59:26-05:00
2019-10-01T12:59:26-05:00 0 Answers
78 views
0
Leave an answer