When I use the Admin API to get a post I’m getting a “Post not found” response:
{"errors"=>[{"message"=>"Resource not found error, cannot read post.", "context"=>"Post not found.", "type"=>"NotFoundError", "details"=>nil, "property"=>nil, "help"=>nil, "code"=>nil, "id"=>"[snip]", "ghostErrorCode"=>nil}]}
The URL I’m hitting is as per the documentation:
GET /admin/posts/{id}/
Apart from the URL, the code I’m using is identical to the same as I use to get all posts, which works perfectly. Also getting by slug:
GET /admin/posts/slug/{slug}/
The post ids I’m using have been checked and double-checked. I’ve even used the ‘all posts’ response to find an id to insert into the ‘single post’ request, but I still get “Post not found”.
I can’t use the Content API because some of the posts I’m querying aren’t published.
Is it possible to GET a single post using the Admin API? Is there anything extra that you have to do (e.g. body content) to access this data?
I’m happy to share the code, but if I simply remove the /id/{id} part of the call, it works and I get all posts. This suggests the authentication and the code is good?
I received a somewhat cryptic email that included this: