Usage » History » Revision 109

« Previous | Revision 109/118 (diff) | Next »
Bernhard Koschiček-Krombholz, 2020-10-23 11:43


This site explains the different usage scenarios. The API basically can be accessed through two methods: Either from the user interface of an OpenAtlas application or, if the settings will allow it, from another application.

Please refer to the SwaggerHub documentation:


No parameters available:

  • Request one entity: /api/0.1/entity/105
  • Download a JSON of one entity: /api/0.1/entity/download/105
  • Request list of entities of one node: /api/0.1/node_entities/26294
  • Request list of entities of one node and subnodes: /api/0.1/node_entities_all/26294
  • Request list of subunits of one place: /api/0.1/subunit/50505
  • Request list of all subunits of one place: /api/0.1/subunit_hierarchy/50505
  • URL for displaying images: /api/display/4215
    • The image will only be displayed if:
      1. A user is logged in
      2. API is set on public
      3. IP is on the whitelist

Parameters available:

  • Request by code: /api/0.1/code/actor
  • Request by class: /api/0.1/class/E18
  • Request by latest: /api/0.1/latest/16 (int = number of entries)
  • Request one or more entities: /api/0.1/query?entities=115&entities=116
  • Request one or more classes: /api/0.1/query?classes=E18&classes=E31
  • Request one or more codes: /api/0.1/query?items=actor&items=source
  • Combine requests: /api/0.1/query?items=actor&items=source&classes=E18&classes=E31&entities=115&entities=116


The API paths also take in parameters.


<'asc', 'desc'>

The sort parameter controls the order of the results. These can be either ascending (asc) or descending (desc). To use this feature add the parameter:


If multiple sort parameter are used, the first valid sort input will be used.
It does not matter if the words are uppercase or lowercase (i.e. DeSc or aSC), but the query only takes asc or desc as valid input. If no valid input is provided, the result is orders ASC.


<'id', 'class_code', 'name', 'description', 'created', 'modified', 'system_type', 'begin_from', 'begin_to', 'end_from', 'end_to'>

The column parameter declares which columns in the table are sorted with the sort parameter.

?column=<'id', 'class_code', 'name', 'description', 'created', 'modified', 'system_type', 'begin_from', 'begin_to', 'end_from', 'end_to'>


If multiple column parameter are used, a list is created, by the order in which the parameters are given (i.e. ?column=name&column=description&column=id will order by name, description and id).
It does not matter if the words are uppercase or lowercase (i.e. Name, ID, DeScrIPtioN or Class_Code). If no valid input is provided, the results are ordered by name.



The limit parameter declares how many results will returned.



If multiple limit parameter are used, the first valid limit input will be used. Limit only take positive numbers.


<=, !=, <, <=, >, >=, LIKE, IN, AND, OR, AND NOT, OR NOT>

The filter parameter is used to specify which entries should return.



Filter takes a lot of different parameters in various forms. Filter values need to be separated by |.
  1. First value has to be a concatenation operator: 'and': 'AND', 'or': 'OR', 'onot': 'OR NOT', 'anot': 'AND NOT'.
  2. Second value has to be the effected column: 'id', 'class_code', 'name', 'description', 'created', 'modified', 'system_type', 'begin_from', 'begin_to', 'end_from', 'end_to'.
  3. Third value has to be a logical operator: 'eq': '=', 'ne': '!=', 'lt': '<', 'le': '<=', 'gt': '>', 'ge': '>=', 'like': 'LIKE',
  4. Fourth value has to be the search term. If the 'in' operator is selected, then the search term has to be in brackets and separated by commas.

Please note, that the filter values will translate directly in SQL. For example:


will result in
AND LIKE %%Ach%% OR > 5432



first=<id> OR last=<id> 

The first parameter takes ids and will show every entity after and including the named id.
The last parameter takes ids and will show every entity after the named id.




First and last take only one id, which is has to be a number. The table will be sorted AND filtered before the pagination comes in place.


Show/Hide Types

<'when', 'types', 'relations', 'names', 'links', 'geometry', 'depictions', 'geonames', 'none'>

The show parameter will take in the key values of a json. If no value is given, every key will be filled. If a value is given, it only will show the types which are committed. If the parameter contains none, no additional keys/values will be shown

?show=<'when', 'types', 'relations', 'names', 'links', 'geometry', 'depictions', 'geonames', 'none'>


For each value a new parameter has to be set. The value will be matched against a list of keywords, so wrong input will be ignored.




Returns a json with a number of the total count of the included entities.



Only count will trigger the function. Count can have any numbers assigned to it, which makes no difference.




Will trigger the download of the result of the request path.



Only download will trigger the function. Download can have anything assigned to it, but this will be discarded.


Updated by Bernhard Koschiček-Krombholz 11 months ago · 109 revisions

Also available in: PDF HTML TXT