Feature #1691


API: Selecting relations to be returned

Added by Andreas Olschnögger about 2 years ago. Updated about 2 years ago.

Target version:
Start date:
Estimated time:


Often not all relations that are returned from the api are needed. When loading many entities this leads to an extreme overhead and also to longer loading times. Therefore it would be great if one could specify which relations one wants to get back.
For example if I want to return all Actors with

and I only need the relation Types "crm:P11i participated in" and "crm:OA7 has relationship to" a solution like

would be a good solution.

Note that this is not a filter option for entities but only limits how much data is returned.

Actions #1

Updated by Alexander Watzinger about 2 years ago

  • Subject changed from Selecting relations to be returned by the api to API: Selecting relations to be returned
  • Status changed from New to Assigned

Sounds like an interesting challenge and a viable suggested solution which could improve performance for presentation sites a lot.
I leave the technical details to you two but thanks for writing an issue for that.

Actions #2

Updated by Bernhard Koschiček-Krombholz about 2 years ago

  • Status changed from Assigned to Resolved
  • Target version set to 7.3.0

Thank you for the issue. It is currently resolved in develop branch.

The parameter is relation_type since we also have this notation with other parameters. Change to camelCase is possible, since API version 0.3 is not officially stable, but we have to change all parameters then (-> breaking changes -> discussion at developer meeting)

Example usage:


It is not currently possible to use i for inverse. If it is really necessary, we can talk about it.

With this function, the backend is also a little faster. Now only links with the given property codes together with P53 (for geometry), P2 (for types) and P67 (for external references and depictions), if they called with show, will be requested. Therefore, lesser calls are made.

Actions #3

Updated by Bernhard Koschiček-Krombholz about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF