Repository navigation
Document the status and search filters of List posts - #34
Merged
Merged
Conversation
added 4 commits
December 3, 2026 16:47
… the status filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
List posts (
GET /api/posts) gets two optional query parameters inopenapi.json:status:draft,scheduled,pending_approval,publishedorfailed.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 sendingpage+ 1 with the same filters untilmeta.current_pageequalsmeta.last_page. The docs used to say to followlinks.next, but the URLs inlinkscarry onlypage(Laravel's default, nowithQueryString()), so following them on a filtered list returned the unfiltered list.The MCP
list-posts-toolalready lists these filters inai/tools-reference.mdx, so only the REST reference changes.Source
Shipped in trypostit/trypost#573:
app/Http/Requests/Api/Post/ListPostsRequest.php:27-34. Both fields arenullable, so empty values pass, andpublishingis not in the list.app/Http/Controllers/Api/PostController.php:53-54, throughPost::withStatus()andPost::contentContains()(whereLike, case-insensitive).Checks
npx mint validatepasses.npx mint broken-linkspasses.