Get post by ID
Endpoint examples
Get Post by ID
GET
Get post by ID
Overview
Response notes
- Returns a single post by its id.
- Helpful to demonstrate path parameters and error handling for missing resources.
- id (number): The post id to fetch.
- Status 200: A Post object with id, userId, title, body.
- Status 404: Not found (JSONPlaceholder returns an empty object for some endpoints; behavior may vary across resources).
- Chain this with GET /comments?postId=1 to show related data fetching.