NatLibFi / Annif

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.
https://annif.org
Other
195 stars 41 forks source link

REST API root resource with version information #655

Closed osma closed 1 year ago

osma commented 1 year ago

The Annif REST API currently doesn't have a root resource. A URL such as http://127.0.0.1:5000/v1/ will give a 404 response.

The API could provide a root resource with some basic information about the API service, including the version of Annif, as a JSON object. Something like this:

{ "title": "Annif REST API", "version": "0.60.0" }

One fancier way to do this would be to implement the JSON Home proposal. See this for a practical example and this for some easy to understand examples. But this may be overkill for the purpose of Annif and the JSON Home spec doesn't seem to be widely used.

Elasticsearch also provides information about the API in a root object as JSON. You can see how it looks (without installing it for yourself) in this post.

The Annif version information, once exposed via the REST API, could be shown in the Finto AI user interface - see https://github.com/NatLibFi/FintoAI/issues/8

juhoinkinen commented 1 year ago

Closed by #658.