API Reference Base URL: https://api.savants.cloud/api/v1. Authenticated endpoints require a Bearer token.
FSM Schemas Method Endpoint Auth Description GET/fsm/schemasYes List schemas for your org POST/fsm/schemasYes Create or update a schema
Create a schema Copy curl -X POST https://api.savants.cloud/api/v1/fsm/schemas \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": "my-workflow",
"version": "1.0",
"initial_state": "draft",
"states": { "draft": { "type": "initial" }, "done": { "type": "terminal" } },
"events": ["finish"],
"transitions": [{ "from": "draft", "event": "finish", "to": "done" }]
}' Entity Instances Method Endpoint Auth Description GET/fsm/instancesYes List all entities with current states GET/fsm/instances/:schema/:entityYes Get specific entity state POST/fsm/instances/:id/eventYes Send an event to an entity
Send an event Copy curl -X POST https://api.savants.cloud/api/v1/fsm/instances/pod-123/event \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"schema_id": "pod",
"event": "crash_detected",
"context": { "restart_count": 5, "namespace": "production" }
}'
# Response:
# { "success": false, "guard_blocked": true, "from_state": "running", "to_state": null } Guards Method Endpoint Auth Description GET/fsm/guardsYes List all guards POST/fsm/guardsYes Set a guard rule DELETE/fsm/guardsYes Remove a guard
Transition Audit Log Method Endpoint Auth Description GET/fsm/transitionsYes Query transition history
Community Registry Method Endpoint Auth Description GET/registryNo Browse packages GET/registry/search?q=...No Search packages GET/registry/categoriesNo List categories GET/registry/:slugNo Package detail GET/registry/:slug/versionsNo Version history POST/registry/publishYes Publish a profile POST/registry/:slug/installYes Install to your org POST/registry/:slug/starYes Star a package
Encode the slug. Every package slug is scoped
(@savants/k8s-monitor), so the @ and the
/ inside it must be percent-encoded, or the router reads the
slash as a path separator and returns 404.
Copy # 404 -- the slash is read as a path separator
curl https://api.savants.cloud/api/v1/registry/@savants/k8s-monitor
# 200
curl https://api.savants.cloud/api/v1/registry/%40savants%2Fk8s-monitor Authentication All authenticated endpoints accept a Bearer token in the Authorization header:
Copy Authorization: Bearer YOUR_JWT_OR_API_KEY Get a token by signing in at savants.cloud/activate or creating an API key in the dashboard .