SuperDocs Demo

List Posts

Retrieve a list of all blog posts

GET /posts

Overview

Returns a list of all blog posts. Supports filtering by user ID and pagination.

Query Parameters

Query Parameters

userId
integer

Filter posts by a specific user ID

_limit
integer = 10

Maximum number of posts to return

_start
integer = 0

Number of posts to skip for pagination

Response

Returns an array of post objects.

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

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..."
},
{
"userId": 1,
"id": 2,
"title": "qui est esse",
"body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor..."
}
]

Filtering Examples

Get posts by a specific user

Terminal window
GET /posts?userId=1

Paginate results

Terminal window
GET /posts?_start=10&_limit=5
Try it out
GET /posts