Docs
Quick start
- Sign up. Camshaft makes your team, with you as its owner.
- In the console, open API keys and make a key. You get a client ID and a secret; the secret is shown once.
- Swap the key for a short-lived access token (client credentials, for Camshaft's API):
curl -s https://auth.camshaft.lunaor.com/token -u "$CAMSHAFT_CLIENT_ID:$CAMSHAFT_CLIENT_SECRET" \ -d grant_type=client_credentials -d resource=https://camshaft.lunaor.com - Save a flow. It becomes your team's:
curl -s -X PUT https://camshaft.lunaor.com/flows/hello -H "authorization: Bearer $TOKEN" -H 'content-type: application/json' \ -d '{"steps": [{"kind": "signal", "name": "go", "signal": "go", "output": "boolean"}], "output": {"ok": "{{steps.go.output}}"}}' - Run it, answer it and read it:
curl -s -X POST https://camshaft.lunaor.com/flows/hello/runs -H "authorization: Bearer $TOKEN" -d '{"id": "first", "input": {}}' -H 'content-type: application/json' curl -s -X POST https://camshaft.lunaor.com/runs/first/signals/go -H "authorization: Bearer $TOKEN" -d '{"value": true}' -H 'content-type: application/json' curl -s https://camshaft.lunaor.com/runs/first -H "authorization: Bearer $TOKEN"
A key is an admin of your team's flows: it saves them, starts, reads, retries and cancels their runs, and sets their schedules. It sees nothing of any other team's. Every key of your team sees the same flows and runs.
Guides and SDKs
- Flows: Typed steps wired together: kinds of step, inputs and outputs, retries, waits, secrets and schedules.
- TypeScript SDK: Workflows served over HTTP, and a client of the API.
- Python SDK: Workflows served over HTTP, and camshaft.client.
- Go client: A client of Camshaft's HTTP API.
The API
Base URL https://camshaft.lunaor.com, JSON in and out, Authorization: Bearer <token> on every call. The main routes:
- PUT /flows/{name} · GET /flows · GET /flows/{name}
- POST /flows/{name}/runs · GET /runs?flow={name} · GET /runs/{id}
- POST /runs/{id}/signals/{name} · POST /runs/{id}/retry · POST /runs/{id}/cancel
- POST /schedules · GET /schedules · GET /metering?from=&to=