Asked an hour ago
GET /sites/{supername}/posts documents page and limit as integers in your OpenAPI spec (https://write.superblog.ai/api/v2/openapi.json): page query integer default 1 limit query integer default 50 Passing either always returns HTTP 400. The validator expects a JS number, but HTTP query parameters are strings by definition — so no client can satisfy it. Looks like z.number() where z.coerce.number() was intended. Reproduction curl -i 'https://write.superblog.ai/api/v2/sites/available/posts?page=2' \ -H 'Authorization: Bearer <API_KEY>' HTTP 400: {"defined":false,"code":"BAD_REQUEST","status":400,"message":"Input validation failed", "data":{"issues":[{"code":"invalid_type","expected":"number","received":"string", "path":["page"],"message":"Expected number, received string"}]}} Identical failure for ?limit=10 (path: ["limit"]). Omitting both returns 200 with the first 50 posts and "totalPages": 21, "totalPosts": 1009 — the server knows there are 21 pages, but there is no way to request page 2. Already ruled out - Alternate param names offset, skip, take, cursor, perPage, pageNumber — all silently ignored, always page 1. - JSON body on GET, and ?input={"json":{"page":2}} — ignored. - statusFilter and searchTerm work correctly, so the problem is specific to the two numeric params. Impact The endpoint returns at most 50 of our 1,009 posts, so we cannot enumerate the site through it. searchTerm caps at 20 results, and the category/tag post endpoints don't accept pagination at all. This is the only listing endpoint in the API, so there is currently no supported way to page through a site's posts.
Abhinav Jain
0
or continue with
By continuing, you are agreeing to our terms of service.