Skip to main content
Fetch status and results for a routine run started by clay routines runs start. The command first tries the inline results endpoint; if the run id is not an inline run, it falls back to the bulk results endpoint.
clay routines runs get <routineRunId> [--limit <n>]
The command auto-paginates inline results internally; cursors are not exposed in the output.

Arguments

ArgumentDescription
routineRunIdRoutine run id, e.g. run_abc123. Required.

Flags

FlagDescription
--limit <n>Cap the number of inline results returned. Must be a positive integer. Ignored for bulk runs (which return a URL).

Output

The mode field discriminates inline vs. bulk; the status field discriminates progress vs. terminal states.

Inline, in progress

{
  "routineRunId": "run_abc123",
  "mode": "inline",
  "status": "in_progress",
  "total": 100,
  "finished": 42
}

Inline, complete

{
  "routineRunId": "run_abc123",
  "mode": "inline",
  "status": "complete",
  "total": 100,
  "finished": 100,
  "data": [
    {
      "id": "row-1",
      "status": "complete",
      "result": {}
    }
  ]
}

Bulk, in progress

{
  "routineRunId": "run_abc123",
  "mode": "bulk",
  "status": "in_progress",
  "total": 1000,
  "finished": 250
}

Bulk, complete

{
  "routineRunId": "run_abc123",
  "mode": "bulk",
  "status": "complete",
  "total": 1000,
  "finished": 1000,
  "resultUrl": "https://..."
}
Download resultUrl to read the JSONL results. The URL is short-lived.

Bulk, validation failed

{
  "routineRunId": "run_abc123",
  "mode": "bulk",
  "status": "validation_failed",
  "error": {
    "message": "Input validation failed",
    "totalInvalidRows": 3,
    "details": [
      {
        "lineNumber": 12,
        "field": "inputs.domain",
        "message": "Required"
      }
    ]
  }
}

Errors

CodeExitNotes
not_found6No inline or bulk run with that id.

Examples

clay routines runs get run_abc123 | jq -r '.status'
clay routines runs get run_abc123 | jq -r '.mode'
clay routines runs get run_abc123 --limit 10 | jq '.data | length'