Skip to content

Commit

Permalink
Added manual entry for 0.4 and small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardKoschicek committed Nov 6, 2023
1 parent 046cc7b commit 28adeda
Show file tree
Hide file tree
Showing 7 changed files with 999 additions and 55 deletions.
3 changes: 3 additions & 0 deletions openatlas/api/endpoints/display_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from openatlas.api.resources.model_mapper import (
get_entities_by_ids, get_entities_by_system_classes, get_entity_by_id)
from openatlas.api.resources.parser import files, image
from openatlas.api.resources.resolve_endpoints import download
from openatlas.api.resources.templates import licensed_file_template
from openatlas.api.resources.util import get_license_name
from openatlas.display.util import (
Expand Down Expand Up @@ -65,4 +66,6 @@ def get() -> tuple[Any, int]:
_external=True),
'license': license_,
'IIIFManifest': iiif_manifest}
if parser['download']:
download(files_dict, licensed_file_template(entities), 'files')
return marshal(files_dict, licensed_file_template(entities)), 200
16 changes: 8 additions & 8 deletions openatlas/api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,21 @@ def admin_routes(api: Api) -> None:
ClassMapping,
'/classes/',
endpoint='class_mapping')
api.add_resource(
SystemClassCount,
'/system_class_count/',
endpoint='system_class_count')
api.add_resource(
LicensedFileOverview,
'/licensed_file_overview/',
endpoint='licensed_file_overview')
api.add_resource(
SystemClassCount,
'/system_class_count/',
endpoint='system_class_count')


def type_routes(api: Api) -> None:
api.add_resource(
GetTypeByViewClass,
'/type_by_view_class/',
endpoint="type_by_view_class")
api.add_resource(
GetTypeOverview,
'/type_overview/',
Expand All @@ -82,10 +86,6 @@ def type_routes(api: Api) -> None:
GetTypeTree,
'/type_tree/',
endpoint="type_tree")
api.add_resource(
GetTypeByViewClass,
'/type_by_view_class/',
endpoint="type_by_view_class")


def special_routes(api: Api) -> None:
Expand Down
21 changes: 11 additions & 10 deletions sphinx/source/technical/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,22 @@ Versioning
==========
.. list-table::
:header-rows: 1
:widths: 20 20 20
:widths: 20 20 20 20

* - stable
- unstable
- deprecated
* - :ref:`0.3<version_0_3>`
- unstable
- unavailable
* - :ref:`0.4<version_0_4>`
- :ref:`0.3<version_0_3>`
- 1.0
- :ref:`0.1<version_0_1>`, :ref:`0.2<version_0_2>`
- :ref:`1.0<version_1_0>`

The OpenAtlas API follows the notion of
`sequenced based versioning <https://en.wikipedia.org/wiki/Software_versioning#Sequence-based_identifiers>`_
and reflects the significance: **major.minor.fix** e.g. **3.11.1**. Only the
**major** number is used for the URL path. **Minor** and **fix** are used for
documentation reasons only with the exception of versions 0.1, 0.2 and 0.3.
documentation reasons only with the exception of versions 0.1, 0.2, 0.3 and 0.4.
A **stable** version of the API will be available at all times. In addition,
**previous** versions will still be usable but tagged as **deprecated**. A
warning will be posted in the
Expand All @@ -118,7 +120,8 @@ has a own set of endpoints, be sure to use the right one.
.. toctree::
:maxdepth: 1

Version 0.3 (stable, current) <api_version_03>
Version 0.4 (stable, current) <api_version_04>
Version 0.3 (stable, deprecated) <api_version_03>
api_version_02
api_version_01
Version 1.0 (whitepaper) <api_version_1>
Expand All @@ -137,19 +140,17 @@ parameters which can be used. So please consult the `Endpoints`_ listing for
more details.

Parameters are added to the end of an URL after the "**?**" symbol
(e.g. demo.openatlas.eu/api/0.3/entity/5117**?download=true**) and are
(e.g. demo.openatlas.eu/api/0.4/entity/5117**?download=true**) and are
connected with the "**&**" sign.
For more general information on this topic see this
`article <https://www.botify.com/learn/basics/what-are-url-parameters#:~:text=URL%20parameters%20(also%20known%20as,by%20the%20'%26'%20symbol.>`_.

At the moment only the :ref:`stable version 0.3<version_0_3>` of the API can
be provided by an detailed parameter list.


.. toctree::
:maxdepth: 1

api_parameters_03
api_parameters_04

Error handling
==============
Expand Down
Loading

0 comments on commit 28adeda

Please sign in to comment.