SuperDocs Demo

Get Post by ID

Retrieve a single blog post by its ID

GET /posts/{id}

Overview

Retrieves detailed information about a specific blog post.

Path Parameters

Path Parameters

id required
integer

The unique identifier of the post to retrieve

Response

id integer

Unique identifier for the post

userId integer

ID of the user who created the post

title string

Title of the post

body string

Full content of the post

Example Response

{
"userId": 1,
"id": 1,
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
}

Error Responses

StatusDescription
404Post not found - the specified ID does not exist
Try it out
GET /posts/{id}