Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST API root resource with version information #655

Closed
osma opened this issue Dec 20, 2022 · 1 comment · Fixed by #658
Closed

REST API root resource with version information #655

osma opened this issue Dec 20, 2022 · 1 comment · Fixed by #658
Milestone

Comments

@osma
Copy link
Member

osma commented Dec 20, 2022

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 NatLibFi/FintoAI#8

@osma osma added this to the Short term milestone Dec 20, 2022
@juhoinkinen juhoinkinen linked a pull request Jan 20, 2023 that will close this issue
@juhoinkinen juhoinkinen modified the milestones: Short term, 0.60 Jan 20, 2023
@juhoinkinen
Copy link
Member

Closed by #658.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants