Skip to content

API

TESK implements the GA4GH Task Execution Service (TES) API. With the default values, it is served at /ga4gh/tes/v1 below the host and path of the deployment (ingress.path + tesk.tesApiBasePath, see Configuration), e.g., https://tes.example.org/ga4gh/tes/v1.

Operation Endpoint
Information about the service GET /service-info
Create a task POST /tasks
List tasks GET /tasks
Get a task GET /tasks/{id}
Cancel a task POST /tasks/{id}:cancel

With tesk-api 1.2.0 or later, the API serves a Swagger UI, at the root path of the deployment, only if tesk.swaggerUi.enabled is true (see Swagger UI); earlier versions always serve it. With auth.mode: auth, requests need an OIDC access token (see Authentication and authorisation), except GET /service-info, which stays public unless auth.serviceInfoPublic is false (see Configuration), the API description (GET /v2/api-docs), and the Swagger UI if it is on.

For example, to create a task from a checkout of this repository and get its state:

TES=https://tes.example.org/ga4gh/tes/v1
curl -X POST "${TES}/tasks" -H 'Content-Type: application/json' \
    -d @examples/success/hello.json
curl "${TES}/tasks/<id>?view=BASIC"

The examples directory has more tasks, which succeed or fail on purpose. See the tesk-api section for details of the API's implementation, its settings and its extensions to the specification.