Fetching posts using API
-
Hi, I am using weDocs for the documentation. I am trying to fetch post using the API, which is not working.
While editing I am seeing the post URL as:
<<host>>/wp-admin/post.php?action=edit&post=554
But while making the API call, I am getting the following response:
curl -i <<host>>/wp-json/wp/v2/posts/554 HTTP/1.1 404 Not Found Date: Thu, 31 Jan 2019 10:16:30 GMT <<some more headers>> Content-Type: application/json; charset=UTF-8 {"code":"rest_post_invalid_id","message":"Invalid post ID.","data":{"status":404}}
Can you point out if I am making any mistake.
- The topic ‘Fetching posts using API’ is closed to new replies.