Skip to content
中文

List runs

Filter tenant runs and list them newest first. Filters include multiple statuses, target, origin, labels[k] and a creation-time lower bound. q matches a run ID exactly when it starts with run_; otherwise it matches a definition-name prefix. Large input/output values are null in lists with input_truncated/output_truncated true; get run details for full values.

GET /automation/v1/runs

Authentication

Authorization: Bearer $PRAXIS_API_KEY

Request fields

Parameter Type Description
query: limit integer optional; Page size: integer 1–100, default 50. minimum: 1; maximum: 100
query: cursor string optional; Opaque next_cursor from the previous page; keep the original filters when paging.
query: kind "script" / "workflow"[] optional; script or workflow; omit for both. Separate multiple values with commas to match any value. minItems: 1
query: definition string[] optional; Exact definition name in ns/name format. Separate multiple values with commas to match any value. minItems: 1
query: version string[] optional; An exact canonical semantic version, such as 1.2.0 or 1.3.0-beta.1, not a range. Separate multiple values with commas to match any value. minItems: 1
query: status "pending" / "running" / "waiting" / "suspended" / "cancelled" / "faulted" / "completed"[] optional; Comma-separated statuses: pending, running, waiting, suspended, cancelled, faulted, completed; omit for all. Separate multiple values with commas to match any value.
query: channel "console" / "api" / "internal" / "run" / "trigger"[] optional; Origin channel: run selects child runs; console, api, internal and trigger select root runs. Separate multiple values with commas to match any value. minItems: 1
query: initiator_type "user" / "api_key" / "agent" / "trigger"[] optional; Root initiator type: user, api_key, agent, trigger or application, inherited by child runs. run returns INPUT_INVALID; filter origin with channel=run or parent_run_id. Separate multiple values with commas to match any value. minItems: 1
query: initiator "me" optional; Only me is supported, matching the current credential subject type and ID, including child runs derived from my runs; omit for all.
query: adhoc boolean optional; true selects ad hoc runs, false published-definition runs; omit for both.
query: language "ts" / "yaml"[] optional; Source language: ts or yaml. Separate multiple values with commas to match any value. minItems: 1
query: parent_run_id string[] optional; Match the direct parent run ID exactly; this lists the child runs of one run (started by a workflow run step or a script invoke()), each with its ID, target, status and timing. Separate multiple values with commas to match any value. minItems: 1
query: root_run_id string[] optional; Match the root run ID exactly to filter a run tree. Separate multiple values with commas to match any value. minItems: 1
query: q string optional; Exact run ID if starting with run_; otherwise a definition-name prefix. % and _ are literal characters.
query: labels object optional; Filter using labels[k]=v; comma-separated values for one key match any, and different keys match together.
query: created_at[gte] string optional; Inclusive creation-time lower bound, as an ISO 8601 timestamp with timezone. format: "date-time"
query: created_at[lte] string optional; Inclusive creation-time upper bound, as an ISO 8601 timestamp with timezone. format: "date-time"

Examples

curl --fail-with-body -X GET "https://api.deepraxis.com/automation/v1/runs" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  --get \
  --data-urlencode "labels[name]=sample-run-1792999476245-c2cdb2" \
  --data-urlencode "limit=1"
import { createAutomationClient } from '@deepraxis/sdk/automation';

function env(name: string): string {
  const value = process.env[name];
  if (!value) throw new Error(`Set ${name}`);
  return value;
}
const automation = createAutomationClient({
  apiKey: env('PRAXIS_API_KEY'),
  baseUrl: 'https://api.deepraxis.com',
  maxRetries: 0,
  timeoutMs: 90_000,
});
const result = await automation.runs.list({
  "query": {
    "labels": {
      "name": "sample-run-1792999476245-c2cdb2"
    },
    "limit": 1
  }
});
console.log(result);

Response

HTTP 200

Success

application/json

Field Type Description
data object[] required; Run summaries on this page, ordered by created_at descending, then id descending.
data[].id string required; Opaque run_ ID. New non-deterministic IDs have 78 characters: run_ + 10-character base36 millisecond timestamp + 64-character hexadecimal DO ID. Legacy random IDs have 46 characters; historical and deterministic IDs remain valid. Same-millisecond creation order is not guaranteed.
data[].kind "script" / "workflow" required; Orchestration kind. script is a TypeScript script that executes once; workflow is a YAML workflow made of steps that can wait for events, timers or child runs and can be suspended.
data[].number null / number required; Increasing sequence number of the run within its script or workflow; null for ad-hoc runs.
data[].definition null / object required; The script or workflow {namespace, name} the run belongs to; null for ad-hoc runs created with source.
data[].definition (variant 2).namespace string required; Namespace of the script or workflow.
data[].definition (variant 2).name string required; Name of the script or workflow.
data[].target null / string required; The target string as supplied at creation (for example acme/report@latest); null for ad-hoc runs.
data[].resolved_version null / string required; Exact version the target resolved to; null for ad-hoc runs.
data[].source_digest null / string required; Digest of the source of an ad-hoc run, usable to read that source; null for runs started from a published definition.
data[].language "ts" / "yaml" required; Source language. ts is a TypeScript script; yaml is workflow YAML.
data[].status "running" / "completed" / "faulted" / "cancelled" / "pending" / "waiting" / "suspended" required; Run status. pending is created but not started; running is executing; waiting means a workflow is waiting on an event, timer or child run; suspended means a workflow was suspended; cancelled was cancelled; faulted failed and error says why; completed finished successfully and output holds the result. The last three are terminal.
data[].progress null / object required; Latest progress reported by the run as {label, current, total, updated_at}; null if none was reported.
data[].progress (variant 2).label string required; Short progress label, such as the current stage.
data[].progress (variant 2).current null / number required; Amount completed so far, or null if not reported.
data[].progress (variant 2).total null / number required; Total amount, or null when unknown.
data[].progress (variant 2).updated_at string required; Time progress was last updated (RFC 3339 UTC).
data[].current_wait null / object required; The wait point the run is currently blocked on, or null when it is not waiting.
data[].current_wait (variant 2).id string required; Wait point id, prefixed wait_; use it as wait_id when completing an event wait.
data[].current_wait (variant 2).run_id string required; Id (run_) of the run this wait belongs to.
data[].current_wait (variant 2).kind "event" / "timer" / "child" required; Wait kind. event waits for an external event that can be submitted with runs.completeWait; timer waits until resume_at; child waits for a child run to finish.
data[].current_wait (variant 2).state "cancelled" / "open" / "resolved" / "expired" required; Deprecated, read status, which holds the same value. Wait point state. open is still waiting; resolved was satisfied; expired passed its expires_at; cancelled was cancelled and can no longer be satisfied.
data[].current_wait (variant 2).task null / object required; The workflow step {reference, name} that produced the wait; null when there is no such step.
data[].current_wait (variant 2).task (variant 2).reference string required; JSON Pointer of the step, for example /do/2/wait_payment.
data[].current_wait (variant 2).task (variant 2).name string required; Step name, the key in the workflow YAML.
data[].current_wait (variant 2).resume_at null / string required; For kind=timer, the instant the run resumes (RFC 3339 UTC); null for other kinds.
data[].current_wait (variant 2).event_type null / string required; For kind=event, the event type being awaited; null for other kinds.
data[].current_wait (variant 2).child_run_id null / string required; For kind=child, the id of the child run being awaited; null for other kinds.
data[].current_wait (variant 2).created_at string required; Time the wait point was created (RFC 3339 UTC).
data[].current_wait (variant 2).expires_at null / string required; Time the wait point expires (RFC 3339 UTC), or null if it has no deadline.
data[].current_wait (variant 2).resolved_at null / string required; Time the wait point was resolved (RFC 3339 UTC), or null if still open.
data[].current_wait (variant 2).status "cancelled" / "open" / "resolved" / "expired" required; Wait point status. open is still waiting; resolved was satisfied; expired passed its expires_at; cancelled was cancelled and can no longer be satisfied.
data[].counters object required; Cumulative counters of a run. no additional fields.
data[].counters.calls number required; Total number of calls the script made.
data[].counters.action_calls number required; How many of those calls invoked actions.
data[].counters.child_runs number required; Number of child runs started.
data[].counters.tasks_completed number required; Number of workflow steps completed.
data[].counters.tasks_total null / number required; Number of top-level steps in the workflow; null for script runs.
data[].input null / string / number / boolean / object / JSON[] required; Any JSON value: null, boolean, number, string, array or object.
data[].input (variant 5).* null / string / number / boolean / object / JSON[] Recursive JSON value.
data[].input (variant 6)[] null / string / number / boolean / object / JSON[] Recursive JSON value.
data[].output null / string / number / boolean / object / JSON[] required; Any JSON value: null, boolean, number, string, array or object.
data[].output (variant 5).* null / string / number / boolean / object / JSON[] Recursive JSON value.
data[].output (variant 6)[] null / string / number / boolean / object / JSON[] Recursive JSON value.
data[].error null / object required; Error details when the run faulted; null otherwise.
data[].error (variant 2).type string required; Platform error category, or the verbatim URI defined by a workflow raise.
data[].error (variant 2).code null / string required; Stable error code callers can branch on, or null.
data[].error (variant 2).title string required; Short error title.
data[].error (variant 2).detail null / string required; Detailed explanation of the error, or null.
data[].error (variant 2).source null / object required; Where the error happened: a workflow step or script call; null when unknown.
data[].error (variant 2).source (variant 2).kind "call" / "task" required; Location kind. task is a workflow step; call is a call in a script.
data[].error (variant 2).source (variant 2).reference string optional; For task: the JSON Pointer of the failing step.
data[].error (variant 2).source (variant 2).seq number optional; For call: sequence number of the failing call (matches Call.seq).
data[].error (variant 2).source (variant 2).action object optional; The failing action {name, revision}; present only when the error came from an action. no additional fields.
data[].error (variant 2).source (variant 2).action.name string required; Full action name, ns/name.
data[].error (variant 2).source (variant 2).action.revision string required; Id (actr_) of the action revision that ran.
data[].error (variant 2).request_id string / null optional; X-Request-Id of the downstream response that caused the failure; null or omitted when unavailable.
data[].error (variant 2).errors object[] optional; Field validation errors with RFC 6901 pointers and Chinese correction details.
data[].error (variant 2).errors[].pointer string required; RFC 6901 field pointer. TypeScript source diagnostics use /source for scripts or /implementation/source for actions; line/column are separate, not pointer segments.
data[].error (variant 2).errors[].detail string required; Chinese correction text saying what is wrong at this location and how to fix it.
data[].error (variant 2).errors[].hint string optional; Optional extra hint giving an actionable next step, such as using a different endpoint.
data[].error (variant 2).errors[].line integer optional; Line number, 1-based; present only when a source location is available. minimum: 1
data[].error (variant 2).errors[].column integer optional; Column number, 1-based; present only when a source location is available. minimum: 1
data[].error (variant 2).status number optional; Optional HTTP-style status declared by a workflow raise; platform errors may omit it.
data[].initiator object required; Principal {type, id} injected by the gateway that says who initiated or acted. This service does not resolve names; the console resolves them in batches. no additional fields.
data[].initiator.type "user" / "api_key" / "agent" / "run" / "trigger" required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger; application is an application.
data[].initiator.id string required; Principal identifier whose meaning follows type: a user, API key, agent, run, trigger or application id. Treat it as an opaque string.
data[].channel "run" / "console" / "api" / "internal" / "trigger" required; Entry channel of the request. console is the console (through its BFF); api is a public API call; internal is an internal platform call; run is a child run created by another run; trigger is started by a trigger.
data[].owner string required; Tenant that owns the run, injected by the gateway; treat it as an opaque string.
data[].parent null / object required; The parent run {id, number, definition} that derived this run, or null for root runs.
data[].parent (variant 2).id string required; Id (run_) of the parent run.
data[].parent (variant 2).number null / number required; Sequence number of the parent run within its definition; null when the parent is ad-hoc.
data[].parent (variant 2).definition null / object required; Script or workflow {namespace, name} of the parent run; null for an ad-hoc parent.
data[].parent (variant 2).definition (variant 2).namespace string required; Namespace of the parent run's definition.
data[].parent (variant 2).definition (variant 2).name string required; Name of the parent run's definition.
data[].parent_run_id string / null required; ID of the parent run that derived this run; null for root runs
data[].root_run_id string required; Id of the root run of this run tree; a root run points to itself.
data[].depth number required; Depth in the run tree: 0 for the root run, plus 1 per child level, at most 10.
data[].attach null / "wait" / "detach" required; Relationship of a child run to its parent. wait means the parent waits for the child and the child's deadline is not later than the parent's; detach means the parent does not wait and the child is not cancelled when the parent is; null for root runs.
data[].deadline_at string required; Deadline of the run (RFC 3339 UTC): creation time plus deadline_seconds (scripts default to and are capped at 300 seconds; workflows default to 86400 and are capped at 2592000 (30 days)), and an awaited child ends at least 1 second before its parent's deadline.
data[].created_at string required; Time the run was created (RFC 3339 UTC).
data[].started_at null / string required; Time execution started (RFC 3339 UTC), or null while still queued.
data[].ended_at null / string required; Time the run reached a terminal status (RFC 3339 UTC), or null while it is still active.
data[].updated_at string required; Time the run record was last updated (RFC 3339 UTC).
data[].heartbeat_at null / string required; Time of the executor's last liveness signal (RFC 3339 UTC), or null before the run starts.
data[].cancel_requested_at null / string required; Time the cancellation was requested (RFC 3339 UTC), or null.
data[].cancelled_by null / object required; Principal that requested cancellation, or null if not cancelled or not requested by a principal.
data[].cancelled_by (variant 2).type "user" / "api_key" / "agent" / "run" / "trigger" required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger; application is an application.
data[].cancelled_by (variant 2).id string required; Principal identifier whose meaning follows type: a user, API key, agent, run, trigger or application id. Treat it as an opaque string.
data[].cancel_reason null / "user" / "parent_cancelled" / "deadline" / "executor_lost" required; Why the run was cancelled. user is a user request; parent_cancelled is a cascade from a cancelled parent run; deadline means the deadline passed; executor_lost means the executor was lost; null if not cancelled.
data[].suspend_requested_at null / string required; Time suspension of the workflow was requested (RFC 3339 UTC), or null.
data[].suspended_by null / object required; Principal that requested suspension, or null.
data[].suspended_by (variant 2).type "user" / "api_key" / "agent" / "run" / "trigger" required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger; application is an application.
data[].suspended_by (variant 2).id string required; Principal identifier whose meaning follows type: a user, API key, agent, run, trigger or application id. Treat it as an opaque string.
data[].queued_ms null / number required; Milliseconds between creation and the start of execution; null until the run starts.
data[].run_ms null / number required; Milliseconds spent executing, excluding time spent waiting on wait points; fixed once the run ends.
data[].wait_ms null / number required; Total milliseconds spent waiting on wait points; null before any wait.
data[].usage object / null required; Returned only in single-run details (including expand); null in lists. Runs themselves are free; these are actual charges for capabilities such as models and search called during the run, attributed by call. Unrated usage is included later. Aggregation failure or timeout (1.5 seconds) returns null while details still return 200.
data[].usage (variant 1).currency "USD" required; Charge currency, always USD.
data[].usage (variant 1).cost string required; Rated actual charges for this run alone, excluding descendants, as an exact dollar decimal string with six fractional digits; 0.000000 when there is no usage. pattern: "^[0-9]+\.[0-9]{6}$"
data[].usage (variant 1).pending_events integer required; Number of this run's own unrated usage events whose charges will be included later. minimum: 0
data[].usage (variant 1).by_service object[] required; This run's actual charges grouped by service, each with service and cost (a six-decimal dollar string); empty when there is no usage.
data[].usage (variant 1).by_service[].service string required; Name of the service that incurred the usage, for example router or search.
data[].usage (variant 1).by_service[].cost string required; Rated actual charges for that service as an exact dollar decimal string with six fractional digits. pattern: "^[0-9]+\.[0-9]{6}$"
data[].usage (variant 1).tree_cost string / null required; Rated actual charges for the entire run tree including the root, as a six-decimal dollar string; null for child runs.
data[].rerun_of null / string required; If this run was created by re-running another run, that run's id (run_); otherwise null.
data[].labels object required; User labels and system labels; trigger runs support 64 user labels, excluding system labels.
data[].trigger object / null required; Trigger {id, name} that started this run, or null when it was not started by a trigger.
data[].trigger (variant 1).id string required; Id (trg_) of the trigger that started this run.
data[].trigger (variant 1).name string required; Name of the trigger that started this run.
data[].cancel_message string / null required; User cancellation note (1–500 characters), or null when omitted. The cancel_reason enum is unchanged.
data[].input_truncated boolean optional; True when the list omits blob-backed input, setting input to null; inline values remain intact and run details return the full value.
data[].output_truncated boolean optional; True when the list omits blob-backed output, setting output to null; inline values remain intact and run details return the full value.
next_cursor null / string required; Cursor for the next page: pass it unchanged as cursor with the same filters; null when there are no more pages. No total is returned.

Measured response

HTTP 200

{
  "data": [
    {
      "id": "run_00mvoxmhd5515a0ff756216efc1cc0464a681b6f639c81d6c5444b0d67d43df0ffaa04995d",
      "kind": "script",
      "number": null,
      "definition": null,
      "target": null,
      "resolved_version": null,
      "source_digest": "7ae6678882a4ef2ea96e401c105d5c6ef512917cd72a9235289d2a3bf1f1b49d",
      "language": "ts",
      "status": "completed",
      "progress": null,
      "current_wait": null,
      "counters": {
        "calls": 0,
        "action_calls": 0,
        "child_runs": 0,
        "tasks_completed": 0,
        "tasks_total": null
      },
      "input": {
        "n": 41
      },
      "output": {
        "answer": 42
      },
      "error": null,
      "initiator": {
        "type": "api_key",
        "id": "key_rbq66f5v9vxqbk6cd702x5er"
      },
      "channel": "api",
      "owner": "org_prxp50ywsssv6s86nhcn8yytb",
      "trigger": null,
      "parent": null,
      "parent_run_id": null,
      "root_run_id": "run_00mvoxmhd5515a0ff756216efc1cc0464a681b6f639c81d6c5444b0d67d43df0ffaa04995d",
      "depth": 0,
      "attach": null,
      "deadline_at": "2026-10-26T07:30:27.017Z",
      "created_at": "2026-10-26T07:25:27.017Z",
      "started_at": "2026-10-26T07:25:28.941Z",
      "ended_at": "2026-10-26T07:25:29.436Z",
      "updated_at": "2026-10-26T07:25:29.436Z",
      "heartbeat_at": "2026-10-26T07:25:28.941Z",
      "cancel_requested_at": null,
      "cancelled_by": null,
      "cancel_reason": null,
      "cancel_message": null,
      "suspend_requested_at": null,
      "suspended_by": null,
      "queued_ms": 1924,
      "run_ms": 495,
      "wait_ms": null,
      "usage": null,
      "rerun_of": null,
      "labels": {
        "namespace": "docs-samples",
        "name": "sample-run-1792999476245-c2cdb2"
      }
    }
  ],
  "next_cursor": null
}

Errors

HTTP Codes and description
400 INVALID_PARAMS: Invalid request parameters, path, cursor, or body format. INPUT_INVALID: The input does not satisfy the target contract or validation rules.
default RFC 9457 automation problem. 429 includes Retry-After.

Authentication and common errors · Retain the X-Request-Id response header for troubleshooting.