Skip to content

Document that REST submissions endpoints support limit/offset #1099

@matthew-white

Description

@matthew-white

I was looking into whether the REST submissions endpoints support paging and wanted to share some of my findings. I found that the endpoints support the query parameters limit and offset:

https://github.com/getodk/central-backend/blob/61b1848ba169eb455477ebeb79f0ea745e6eb478/lib/model/query/submissions.js#L90-L103

I tried sending API requests to .../submissions and can see that limit and offset have an effect. However, the API docs indicate that paging isn't supported:

https://github.com/getodk/central-backend/blob/61b1848ba169eb455477ebeb79f0ea745e6eb478/docs/api.md?plain=1#L1869-L1871

I think we should document that these query parameters are supported. However, we should probably note, as we do for the OData endpoints, that paging does not greatly improve performance:

https://github.com/getodk/central-backend/blob/61b1848ba169eb455477ebeb79f0ea745e6eb478/docs/api.md?plain=1#L3243

This TODO can also be removed:

https://github.com/getodk/central-backend/blob/61b1848ba169eb455477ebeb79f0ea745e6eb478/lib/resources/submissions.js#L330-L334

Just wanted to share what I found as I looked into these query parameters!

Metadata

Metadata

Assignees

Labels

backendRequires a change to the API serverdocumentationAPI docs, readme, developer docs

Type

No type

Projects

Status

🕒 backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions