Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

REST API

Base URL: http://localhost:8000

Health

GET /health
{ "status": "UP", "version": "0.1.0" }

Jobs

MethodPathDescription
POST/jobsSubmit a job
POST/jobs?wait=trueSubmit and block until completion
GET/jobsList jobs
GET/jobs/{id}Get job details
GET/jobs/{id}/logFetch job logs
POST/jobs/{id}/cancelCancel a job
PUT/jobs/{id}/cancelCancel a job
PUT/jobs/{id}/restartRestart a job

Example request body:

name: hello shell
tasks:
  - name: hello
    run: echo "hello from twerk"

Tasks

MethodPathDescription
GET/tasks/{id}Get task details
GET/tasks/{id}/logFetch task logs

Scheduled Jobs

MethodPathDescription
POST/scheduled-jobsCreate a scheduled job
GET/scheduled-jobsList scheduled jobs
GET/scheduled-jobs/{id}Get a scheduled job
PUT/scheduled-jobs/{id}/pausePause a scheduled job
PUT/scheduled-jobs/{id}/resumeResume a scheduled job
DELETE/scheduled-jobs/{id}Delete a scheduled job

Queues

MethodPathDescription
GET/queuesList queues
GET/queues/{name}Get queue details
DELETE/queues/{name}Delete a queue

System

MethodPathDescription
GET/nodesList nodes
GET/nodes/{id}Get node details
GET/metricsFetch metrics
POST/usersCreate a user

Triggers

MethodPathDescription
GET/api/v1/triggersList triggers
POST/api/v1/triggersCreate a trigger
GET/api/v1/triggers/{id}Get a trigger
PUT/api/v1/triggers/{id}Update a trigger
DELETE/api/v1/triggers/{id}Delete a trigger

OpenAPI

GET /openapi.json

CLI Integration

# Submit and wait for completion
curl -X POST 'http://localhost:8000/jobs?wait=true' \
  -H "Content-Type: text/yaml" \
  --data-binary @examples/hello-shell.yaml

# Inspect the resulting job and logs
curl http://localhost:8000/jobs/$JOB_ID
curl http://localhost:8000/jobs/$JOB_ID/log

Next Steps