Skip to content

Web Service exposing Thoth functions to the RESTful worlds

License

Notifications You must be signed in to change notification settings

thoth-station/user-api

Repository files navigation

Thoth User-facing API

GitHub tag (latest by date) Quay - Build Codacy Badge

Thoth Deployment

You can find Thoth's deployment at khemenu.thoth-station.ninja.

Talking to API

User API is the main interaction point for a user or bot with Thoth. The API itself exposes endpoints that are well documented using OpenAPI (see openapi directory present in the repo). There are exposed only endpoints that can be useful for a user in some way.

If you would like to programmatically access this API service, the preferred way for interaction is the autogenerated swagger-client available in the Thamos repository (see autogenerated documentation for more info). You can be also ensured that this client is kept up2date respecting the current API state.

Installation and deployment

The service is built using OpenShift Source-to-Image and deployed automatically with Thoth's deployment available in the thoth-station/thoth-application repository.

Running User API locally

User API can be run locally in a mode when it still talks to the cluster. To run User API locally, create .env file out out .env.template and adjust environment variable values as desired (see thoth-station/storages for more info):

cp .env.template .env
vim .env

Once the environment is properly setup, you can run User API locally:

pipenv install
pipenv run gunicorn thoth.user_api.openapi_server:app --config gunicorn.conf.py