# getRun()

Canonical URL: https://developers.iagenify.com/sdk/ref/workflows/get-run/
Language: en

`api.workflows.getRun(runId) → Promise<WorkflowRun>`

A run from its identifier alone — without knowing which workflow it belongs to.

Status: GET /api/workflows/runs/:id · free · no workflow needed

```javascript
const run = await api.workflows.getRun(runId);

await run.wait();
console.log(run.data.status, run.data.steps.map((s) => `${s.id}: ${s.status}`));
```

## Why it exists {#why}

> **A run identifier is often all you have**
>
> Something started a run — an agent, a webhook, a scheduled trigger — and handed back an id. Without this you would have to know the workflow first and find the run in its list, which is a detour for a thing you already identified.

## Following a run across processes {#pattern}

```javascript
// One process starts it
const { id } = (await workflow.run({ input })).data;
await queue.push(id);

// Another, later, follows it
const run = await api.workflows.getRun(id);
await run.wait({ until: ["succeeded", "failed", "waiting"] });
```

The run does not depend on either process: it is on the platform from the moment it starts.

## It is a full WorkflowRun {#same-object}

`refresh()`, `wait()`, `resume()`, `retry()` and `cancel()` all work — so a human approval can be given from somewhere entirely different from where the run began.

- [WorkflowRun](/sdk/ref/workflow-run): Following, approving, retrying.
- [resume()](/sdk/ref/workflow-run/resume): Approving a human step.

```python
run = api.workflows.get_run(run_id)

run.wait()
print(run.data["status"], [f"{s['id']}: {s['status']}" for s in run.data["steps"]])
```

```python
# One process starts it
run_id = workflow.run(input=payload).id
queue.push(run_id)

# Another, later, follows it
run = api.workflows.get_run(run_id)
run.wait(until=["succeeded", "failed", "waiting"])
```
