WP API to fetch all records for /posts, /media, /categories

Question

I was using the below API to fetch all posts

http://example.com/wp-json/wp/v2/posts/?filter[posts_per_page]=-1

Since the last two days, all of a sudden it stopped working.

For example, the first API used to give me 37 records with 10 records per page, but now it only gives me 10 records instead of 37. It does not return records for rest of the pages. I checked the WordPress site from where I am trying to fetch it, it still has 4 pages and 37 records.

Does anyone has any update if WordPress has changed the API? Below is the path for the API:

http://v2.wp-api.org/reference/posts/

0
Srikant Behra 7 months 0 Answers 68 views 0

Leave an answer