dograh/docs/api-reference
Amaan Javed 9471041b8b
fix(api): validate pagination bounds on run-list endpoints (#553) (#554)
* fix(api): validate pagination bounds on run-list endpoints (#553)

GET /workflow/{id}/runs and GET /campaign/{id}/runs declared bare
`page: int = 1` / `limit: int = 50` params, then computed
`total_pages = (total_count + limit - 1) // limit`. A `?limit=0` raised an
unhandled ZeroDivisionError (HTTP 500), and negative limit/page produced a
negative offset and nonsensical pagination.

Add `Query(ge=1, le=100)` / `Query(1, ge=1)` bounds to both endpoints,
matching the sibling list endpoints (/usage/runs and the superuser runs
endpoint) that already validate these. Out-of-range values now return 422.

Adds a regression test covering limit=0/-5/101 and page=0 on both endpoints.

Fixes #553

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore(docs): regenerate openapi.json for run-list pagination bounds (#553)

The added Query(ge/le) bounds on the workflow-run and campaign-run list
endpoints changed the OpenAPI schema; regenerate the committed spec via
`python -m scripts.dump_docs_openapi` so the drift-check passes. Only the
limit/page parameter schemas for those two endpoints change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
2026-07-18 16:29:28 +05:30
..
agents chore: return formatted transcript url 2026-05-26 13:24:12 +05:30
api-keys docs: add developer and api reference tabs (#190) 2026-03-14 16:30:02 +05:30
campaigns chore: return formatted transcript url 2026-05-26 13:24:12 +05:30
runs chore: return formatted transcript url 2026-05-26 13:24:12 +05:30
telephony-configs chore: add telephony configuration docs 2026-05-02 17:37:48 +05:30
agents.mdx docs: add developer and api reference tabs (#190) 2026-03-14 16:30:02 +05:30
api-keys.mdx docs: add developer and api reference tabs (#190) 2026-03-14 16:30:02 +05:30
authentication.mdx docs: add developer and api reference tabs (#190) 2026-03-14 16:30:02 +05:30
campaigns.mdx docs: add developer and api reference tabs (#190) 2026-03-14 16:30:02 +05:30
errors.mdx docs: add developer and api reference tabs (#190) 2026-03-14 16:30:02 +05:30
openapi.json fix(api): validate pagination bounds on run-list endpoints (#553) (#554) 2026-07-18 16:29:28 +05:30
overview.mdx docs: add developer and api reference tabs (#190) 2026-03-14 16:30:02 +05:30
runs.mdx chore: return formatted transcript url 2026-05-26 13:24:12 +05:30
telephony-configs.mdx chore: add telephony configuration docs 2026-05-02 17:37:48 +05:30