API performance improvement #555

Open
opened 2026-07-10 13:30:07 +02:00 by mpeltriaux · 0 comments
Owner

Status quo

The GET method returns a full representation of the object, which leads to a longer response time per returned entry.

Improvement

We should think about one of the following solutions to this problem:

  • add an properties attribute to the GET endpoint, which holds the desired attributes in the properties element of the returned geojson. This way a call on .../api/v1/intervention?properties=identifier,id would return a minimalistic geojson, holding only the geometry and identifier and id. If no properties parameter is given, the regular full object representation will be returned.
    • Pro: Very flexible system where the API user decides on the returned payload
    • Con: Possibly a more complex serialization logic due to the need for parsing the parameters and map them onto the object attributes that shall be serialized
  • Add another GET endpoint like .../api/v1/intervention/brief, which returns an extremely reduced set of attributes, which are equal to all types of objects (e.g. id, identifier, title, last_modified)
    • Pro: More easy to set up
    • Con: Not as flexible as the first approach
# Status quo The GET method returns a full representation of the object, which leads to a longer response time per returned entry. # Improvement We should think about one of the following solutions to this problem: * add an `properties` attribute to the GET endpoint, which holds the desired attributes in the `properties` element of the returned geojson. This way a call on `.../api/v1/intervention?properties=identifier,id` would return a minimalistic geojson, holding only the geometry and `identifier` and `id`. If no `properties` parameter is given, the regular full object representation will be returned. * Pro: Very flexible system where the API user decides on the returned payload * Con: Possibly a more complex serialization logic due to the need for parsing the parameters and map them onto the object attributes that shall be serialized * Add another GET endpoint like `.../api/v1/intervention/brief`, which returns an extremely reduced set of attributes, which are equal to all types of objects (e.g. `id`, `identifier`, `title`, `last_modified`) * Pro: More easy to set up * Con: Not as flexible as the first approach
mpeltriaux added the enhancement label 2026-07-10 13:30:07 +02:00
mpeltriaux self-assigned this 2026-07-10 13:30:07 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: IT-Naturschutz/konova#555