Saved actions

Save a capability's configuration once, then call it by name.
View as Markdown

Every capability takes its configuration inline. A saved action is that same configuration, stored under a name and a slug, so a call becomes {"file": …, "action": "medical-intake"}. Both ramps drive the same engine — inline config is the fastest way to start, saved actions are how a team keeps a configuration honest over time.

What the saved ramp buys you:

  • Reuse — one schema or redaction policy, referenced from every call, every pipeline step, and the product UI.
  • Governance — the configuration changes in one place, not in every caller’s source.
  • Record binding — an extract action bound to a data object (objectDefinitionId) can have its results imported as records when you keep the run.
  • Stable config under keep — the run snapshots the configuration it ran with, so a kept result stays explainable after the action changes.

Discover what you can save

GET /v1/actions/catalog is the discovery endpoint: every capability you can save an action for, the slugs behind it, and the JSON Schema of each slug’s config.

$curl https://api.cloudraker.com/v1/actions/catalog \
> -H "Authorization: Bearer $CLOUDRAKER_API_KEY"
1{
2 "object": "list",
3 "data": [
4 {
5 "capability": "extract",
6 "name": "Extract structured data",
7 "description": "Extracts data matching your schema from processed documents and transcripts, with per-field source evidence.",
8 "slugs": ["extract-structured"],
9 "actions": [
10 { "slug": "extract-structured", "name": "Extract structured data", "configSchema": { /* JSON Schema */ } }
11 ]
12 },
13 {
14 "capability": "redact",
15 "name": "Redact PDF",
16 "slugs": ["redact-pdf", "redact-audio"],
17 "actions": [ /* one entry per slug, each with its own configSchema */ ]
18 }
19 // …fill, sign
20 ]
21}

The catalog covers the four capabilities that have a saved configuration: extract, redact, fill, and sign. Parse has nothing to configure and pipelines are composed per call, so neither appears.

redact covers two variants — documents and audio. Pass mimeType when you save one so the right variant is chosen.

Save an action

$curl -X POST https://api.cloudraker.com/v1/actions \
> -H "Authorization: Bearer $CLOUDRAKER_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "capability": "extract",
> "name": "Medical intake",
> "config": {
> "schema": {
> "type": "object",
> "properties": {
> "patient_name": { "type": ["string", "null"] },
> "visit_date": { "type": ["string", "null"] }
> }
> },
> "instructions": "Dates are DD/MM/YYYY.",
> "unit": "per_document"
> }
> }'
1{
2 "object": "action",
3 "id": "21f122a6-9f8b-4f2c-8a0f-6f3e1c9b2d44",
4 "slug": "medical-intake",
5 "name": "Medical intake",
6 "capability": "extract",
7 "config": { }
8}
FieldWhat it is
capabilityRequired. extract, redact, fill, or sign.
nameRequired. ≤ 200 characters. The slug is derived from it and is unique in your organization.
configThe saved configuration — validated against that capability’s configSchema. An extract config.schema must satisfy the schema dialect.
mimeTypePicks the variant when a capability has several slugs (redact).

Reference it

The id and the slug are interchangeable everywhere an action is referenced — action: "medical-intake" and action: "21f122a6-…" do the same thing. Ids are opaque strings; treat them as such.

$# a verb
$curl -X POST https://api.cloudraker.com/v1/extract \
> -H "Authorization: Bearer $CLOUDRAKER_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{ "file": { "id": "a04d6597-…" }, "action": "medical-intake" }'

Inline fields sent alongside action are deep-merged over the saved configuration and win, so a one-off tweak never requires a second saved action:

1{ "file": { "id": "a04d6597-…" }, "action": "medical-intake", "instructions": "This batch is in French." }

In a pipeline, a saved action is either a typed step with overrides — {"extract": {"action": "medical-intake"}} — or a bare {"action": "medical-intake"} step that runs it as-is.

Saved sign actions are a dead end today: POST /v1/actions accepts "capability": "sign", but no /v1 request path takes a reference to one — POST /v1/sign and {"sign": …} pipeline steps are configured inline only. Passing a sign action as another verb’s action, or as a bare {"action": …} step, returns 400 invalid_request: only the sign path keeps the run exempt from the TTL purge while an envelope is open.

List, read, delete

$curl "https://api.cloudraker.com/v1/actions?limit=50" \
> -H "Authorization: Bearer $CLOUDRAKER_API_KEY"
$
$curl https://api.cloudraker.com/v1/actions/medical-intake \
> -H "Authorization: Bearer $CLOUDRAKER_API_KEY"
$
$curl -X DELETE https://api.cloudraker.com/v1/actions/medical-intake \
> -H "Authorization: Bearer $CLOUDRAKER_API_KEY"

GET /v1/actions pages with ?limit (1–100) and ?starting_after=<id>. Keep paging while has_more is true — a page can be shorter than limit, so the row count is not a reliable end-of-list signal.

Deleting an action does not disturb runs that already used it: each run snapshotted the configuration it ran with.

Next steps