Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6560,6 +6560,8 @@ paths:
Returns all Stories visible to the authenticated user. Stories capture text, media, and progress towards Changes and Indicators, and can be tagged to Beneficiaries.

**Timestamp note:** `actual_created_at` = Date Posted · `created_at` = Date Happened · `updated_at` = Date Edited

Returns up to 200 Stories per page. A `per_page` above 200 returns a 422 error; page through larger sets with `page`.
operationId: listStories
security: [{tokenAuth: []}]
parameters:
Expand All @@ -6575,6 +6577,8 @@ paths:
$ref: '#/components/schemas/PaginatedStories'
"401":
$ref: '#/components/responses/Unauthorized'
"422":
$ref: '#/components/responses/UnprocessableEntity'

post:
tags: [Stories]
Expand Down
7 changes: 5 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2372,9 +2372,12 @@ function buildDocsPage() {
<div class="endpoint-list">
${endpointCard("GET", "/stories", "List all Stories", true, [
{ name: "page", type: "integer", required: false, desc: "Page number" },
{ name: "per_page", type: "integer", required: false, desc: "Records per page" },
{ name: "per_page", type: "integer", required: false, desc: "Records per page (default 10, max 200)" },
{ name: "last_sync_datetime", type: "string", required: false, desc: "ISO 8601 incremental sync" }
], [{ code: "200", cls: "response-2xx", desc: "Paginated list of Stories with custom fields and beneficiary IDs" }])}
], [
{ code: "200", cls: "response-2xx", desc: "Paginated list of Stories with custom fields and beneficiary IDs" },
{ code: "422", cls: "response-4xx", desc: "per_page is above 200" }
])}
${endpointCard("GET", "/stories/{id}", "Get a single Story", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Story ID" }
], [
Expand Down
Loading