Skip to content

Document the status and search filters of List posts - #34

Merged
paulocastellano merged 4 commits into
mainfrom
docs/list-posts-status-search
Dec 3, 2026
Merged

paulocastellano merged 4 commits into
mainfrom
docs/list-posts-status-search

Conversation

@paulocastellano

@paulocastellano paulocastellano commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What changes

List posts (GET /api/posts) gets two optional query parameters in openapi.json:

  • status: draft, scheduled, pending_approval, published or failed.
  • search: posts whose text contains the value, ignoring case. At most 255 characters.

An empty value of either one applies no filter.

Pagination (api-reference/introduction.mdx, and the List posts and List ideas descriptions): a client pages by sending page + 1 with the same filters until meta.current_page equals meta.last_page. The docs used to say to follow links.next, but the URLs in links carry only page (Laravel's default, no withQueryString()), so following them on a filtered list returned the unfiltered list.

The MCP list-posts-tool already lists these filters in ai/tools-reference.mdx, so only the REST reference changes.

Source

Shipped in trypostit/trypost#573:

  • Validation: app/Http/Requests/Api/Post/ListPostsRequest.php:27-34. Both fields are nullable, so empty values pass, and publishing is not in the list.
  • Filters: app/Http/Controllers/Api/PostController.php:53-54, through Post::withStatus() and Post::contentContains() (whereLike, case-insensitive).

Checks

  • npx mint validate passes.
  • npx mint broken-links passes.

@paulocastellano
paulocastellano merged commit 9afb186 into main Dec 3, 2026
1 check passed
@paulocastellano
paulocastellano deleted the docs/list-posts-status-search branch December 3, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant