OpenSOP API Reference v0.1

Get instance state

GET /sop/:name/:id

Returns the current state of a process instance — inputs, outputs, current state, and a summary of each step's status.

AUTH
Requires X-SOP-Token header. See Authentication.

Path parameters

name string REQUIRED
The process name.
id string REQUIRED
The instance ULID returned by POST /start.

Response

200 application/json — Instance state with inputs, outputs, and step summary.

Errors

404 not_found No instance with that id under the named process.
curl https://api.opensop.dev/sop/customer-onboarding/01HXYZ_ACME_001 \
  -H "X-SOP-Token: $OPENSOP_TOKEN"
RESPONSE 200
{
  "id":           "01HXYZ_ACME_001",
  "process":      "customer-onboarding",
  "state":        "completed",
  "inputs":       { "company_name": "Acme Corp", "country": "US" },
  "outputs":      { "account_id": "ACC-9271", "status": "approved" },
  "started_at":   "2024-01-15T10:30:00Z",
  "completed_at": "2024-01-15T11:02:14Z"
}