Check run status

The /run-data endpoint tells you whether an automation is currently running, and returns any data it wrote out (for example, rows added to a Google Sheet, or values returned from a custom JavaScript step). Identify the run by the automation's name, the same string you pass to /trigger. Poll it after triggering to know when the run has finished.

For the result of a run — whether it succeeded or failed — use /run-reports.

Request


POST /api/v3/run-data
ParameterTypeRequiredDescription
keystringYesYour API key. See Authentication.
namestringYesExact name of the automation, as it appears in the Dashboard. Case-sensitive and whitespace-sensitive. Same string you pass to /trigger.

Request payload

{
  "key": "<API_KEY>",
  "name": "<AUTOMATION_NAME>"
}

Response


{
  "status": "Finished",
  "data": {
    "google-sheet-data": [
      ["A1", "B1", "C1"],
      ["A2", "B2", "C2"]
    ]
  }
}
FieldTypeDescription
statusstringEither Running or Finished. See Status values.
dataobjectData the automation wrote out, keyed by the token name of each Google Sheet (or other writer step). Each value is a 2D array of [row][col].

Status values

ValueMeaning
RunningA cloud pod is executing the automation right now.
FinishedNo pod is executing it.

Finished means the automation is not running. It does not indicate whether the run succeeded — for that, use /run-reports, which reports each run's outcome.

Before polling, confirm the run started and was not queued. The /trigger response tells you: a run that started returns a viewer URL, while a queued run returns "status": "queued". A queued run reports Finished here until a pod picks it up.

Example


curl -X POST https://lar.axiom.ai/api/v3/run-data \
  -H "Content-Type: application/json" \
  -d '{
    "key": "your-api-key-here",
    "name": "My First Automation"
  }'

A typical polling loop, once /trigger has confirmed the run started:

async function waitForRun(name, key) {
  while (true) {
    const res = await fetch("https://lar.axiom.ai/api/v3/run-data", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ key, name }),
    });
    const result = await res.json();

    if (result.status === "Finished") return result.data;

    await new Promise(r => setTimeout(r, 10_000)); // poll every 10s
  }
}

To find out whether the run succeeded, fetch its report with /run-reports once it reports Finished.

Polling cadence


Poll every 5 to 15 seconds for most automations. Faster polling won't make the run finish any quicker, and may trip rate limits. For long-running automations (those that take more than a few minutes), increase the interval to 30 seconds or use exponential backoff: start at 5 seconds, double each time, cap at 60.

When there's no completion webhook


The API doesn't push a notification when a run finishes; polling /run-data is the only way to detect completion from outside. If you want a push-style notification, add a Trigger webhook step inside the automation itself. The automation will POST to your URL when it reaches that step, which you can place at the end of the flow to get a "done" signal.

Notes


  • /run-data returns the status of the most recent run of an automation with the given name. To see runs further back in history, use /run-reports.
  • The data object is keyed by the token name of each writer step (most commonly a Google Sheet token). One automation can write to several sheets, in which case data has several keys. Each value is the 2D [row][col] content of that sheet.
  • An automation that doesn't write any data returns data as an empty object.
  • A queued run reports Finished until a pod picks it up. Check the /trigger response to see whether the run started or was queued. See Queue and concurrency.
  • Names are matched exactly. Case and whitespace must match the Dashboard.