REST API for no longer returning pages in /posts endpoint
-
For the past years, I’ve been querying the public rest API for /posts?type=page and getting a list of pages on my blog. However, just recently this endpoint started returning 0 found results.
if i create a new post, then the /posts endpoint works fine, but if i filter to pages nothing is returned.
The URL that I expect to return results:
https://public-api.wordpress.com/rest/v1/sites/54142117/posts?pretty=1&type=pageI’ve confirmed the site id is correct, the root of the API returns the valid site info: https://public-api.wordpress.com/rest/v1/sites/54142117/
did something change with the API? known issue? workaround?
The blog I need help with is: (visible only to logged in users)
-
Hi there,
Sorry for the trouble! I’m not sure why that query on the /posts endpoint is no longer returning results for you. I’m checking with our team now to find out why that’s happening, and I’ll let you know as soon as I find out more. :)
-
-
-
I just got an update from our team, and they fixed up the API so your query is working again:
https://public-api.wordpress.com/rest/v1/sites/54142117/posts?pretty=1&type=page
Please let me know if I can do anything more to help with that. :)
-
- The topic ‘REST API for no longer returning pages in /posts endpoint’ is closed to new replies.