Skip to content

Change geojson API query parameters to match OData query parameters #1396

@lognaturel

Description

@lognaturel

getodk/central-backend#1603 introduced a new API for requesting geojson for a form's submissions. That API currently supports some filtering using query parameters specific to that endpoint. Instead, we'd like to use the OData-inspired $filter query parameter and eventually introduce $select as well.

As stated in the docs for the .csv.zip endpoint:

You can use an OData-style $filter query to filter the submissions that will appear in the ZIP file. This is a bit awkward, since this endpoint has nothing to do with OData, but since we already must recognize the OData syntax, it is less strange overall for now not to invent a whole other one here.

We have several bulk data endpoints and want them all to be filtered the same way because:

  • we know some clients (e.g. frontend, pyodk) will use multiple of these endpoints together and it's convenient if they can use the exact same structure
  • the filter query is a bit awkward but it is expressive (e.g. it's possible to express or, etc)
  • we want to share filter implementation as much as possible
  • we want to introduce some better validation and error messages and want that to be consistent for all filtering

We may release v2025.3 without this change and if we do we will indicate that filtering query parameters are experimental and should not be depended on.

Metadata

Metadata

Assignees

Labels

backendRequires a change to the API serverfrontendRequires a change to the UI

Type

No type

Projects

Status

✅ done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions