Skip to content

API Reference

The YAPTIDE backend exposes a RESTful JSON API built with Flask-RESTful. All endpoints are registered in a single initialize_routes() function.

https://<your-host>/

In a local Docker Compose setup: http://localhost/

Most endpoints require a valid JWT access token. The token is sent as an HTTP-only cookie named access_token, set automatically on login.

Two authentication modes:

ModeLogin EndpointToken Source
NativePOST /auth/loginBackend-issued JWT
Keycloak SSOPOST /auth/keycloakKeycloak JWT exchanged for backend JWT

Protected endpoints return 401 Unauthorized if no valid token is present.

GroupPrefixDescription
Auth/auth/*Registration, login, logout, token refresh
Jobs/jobs/*Submit, monitor, and cancel simulations
Results/results, /estimators, /inputs, /logfilesRetrieve simulation output
User/user/*, /clustersUser profile and cluster management

All responses return JSON. Successful responses include a message field:

{
"message": "...",
...
}

Error responses include message and often status_code:

{
"message": "Description of what went wrong",
"status_code": 400
}
  • GET and DELETE endpoints use query parameters.
  • POST and PUT endpoints accept a JSON request body.

Some endpoints are worker-facing only — called by Celery simulation workers or batch polling helpers to report progress back to the backend:

EndpointPurpose
POST /jobsUpdate job state
POST /resultsUpload simulation results
POST /logfilesUpload log files
POST /tasksUpdate individual task state

These require an update_key (shared secret) rather than user authentication.

MethodPathAuthDescription
GET/NoHealth check
PUT/auth/registerNoRegister user
POST/auth/loginNoLog in
GET/auth/refreshYesRefresh token
GET/auth/statusYesCurrent user info
DELETE/auth/logoutYesLog out
POST/auth/keycloakNo*Keycloak login
DELETE/auth/keycloakYesKeycloak logout
POST/jobs/directYesSubmit direct job
GET/jobs/directYesGet direct job status
DELETE/jobs/directYesCancel direct job
POST/jobs/batchYes†Submit batch job
GET/jobs/batchYes†Get batch job status
DELETE/jobs/batchYes†Cancel batch job
GET/jobsYesGet job status (DB)
GET/resultsYesGet results
GET/estimatorsYesGet estimator metadata
GET/inputsYesGet input config
GET/logfilesYesGet log files
GET/user/simulationsYesList user’s simulations
DELETE/user/simulationsYesDelete a simulation
POST/user/updateYesUpdate profile
GET/clustersYes†List HPC clusters

* Requires a valid Keycloak token in the request body. † Requires Keycloak authentication (PLGrid access).