---
title: "Get a run"
---

> Documentation Index
> Fetch the complete documentation index at: https://simplcron.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a run

Path: Simplcron API › Runs

`GET /v1/runs/{runId}`

Inspect the job payload, result, run state, attempt timings and recorded activity.

## Authentication

Requires one of the following:

- `bearerAuth`, http bearer, header `Authorization`
- `browserSession`, apiKey, in cookie
- `localBrowserSession`, apiKey, in cookie

## Path parameters

- `runId` (`getRun.path.runId`; string, required) — ID returned at submission.
  - pattern: `^run_[a-f0-9]{32}$`

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/v1/runs/<runId>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = '<base-url>/v1/runs/<runId>';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/v1/runs/<runId>"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Run with attempts and events

#### Example

```json
{
  "run": {
    "id": "string",
    "runId": "string",
    "task": "string",
    "taskName": "string",
    "status": "scheduled",
    "source": "string",
    "attempt": 5,
    "maxAttempts": 3,
    "payload": {},
    "output": null,
    "error": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "startedAt": "2019-08-24T14:15:22Z",
    "finishedAt": "2019-08-24T14:15:22Z",
    "runAt": "2019-08-24T14:15:22Z",
    "nextAttemptAt": "2019-08-24T14:15:22Z",
    "waitUntil": "2019-08-24T14:15:22Z",
    "waitStartedAt": "2019-08-24T14:15:22Z",
    "waitResumedAt": "2019-08-24T14:15:22Z",
    "replyTimeoutSeconds": 5,
    "waitOutcome": "reply",
    "reply": {
      "receivedAt": "2019-08-24T14:15:22Z",
      "payload": {}
    },
    "durationMs": 0,
    "previousRunId": "string"
  },
  "attempts": [
    {
      "number": 5,
      "status": "scheduled",
      "startedAt": "2019-08-24T14:15:22Z",
      "finishedAt": "2019-08-24T14:15:22Z",
      "statusCode": 0,
      "durationMs": 0,
      "error": "string"
    }
  ],
  "events": [
    {
      "id": "string",
      "type": "string",
      "time": "2019-08-24T14:15:22Z",
      "attempt": 5,
      "detail": "string"
    }
  ]
}
```

- `run` (`getRun.response.200.run`; object, required)
  - `id` (`getRun.response.200.run.id`; string, required)
  - `task` (`getRun.response.200.run.task`; string, required)
    - maxLength: `64` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*$`
  - `status` (`getRun.response.200.run.status`; string, required)
    - one of `"scheduled"`, `"queued"`, `"waiting"`, `"running"`, `"retrying"`, `"succeeded"`, `"failed"`, `"cancelled"`
  - `attempt` (`getRun.response.200.run.attempt`; integer, required)
    - maximum: `5` · minimum: `0`
  - `maxAttempts` (`getRun.response.200.run.maxAttempts`; integer, required)
    - maximum: `5` · minimum: `1` · default: `3`
  - `createdAt` (`getRun.response.200.run.createdAt`; string, required)
    - format: `date-time`
  - `runId` (`getRun.response.200.run.runId`; string, optional)
  - `taskName` (`getRun.response.200.run.taskName`; string, optional)
  - `source` (`getRun.response.200.run.source`; string, optional)
  - `payload` (`getRun.response.200.run.payload`; object, optional)
  - `output` (`getRun.response.200.run.output`; unknown, optional)
  - `error` (`getRun.response.200.run.error`; any of, optional)
    - any of the following: `string`, `null`
  - `startedAt` (`getRun.response.200.run.startedAt`; any of, optional)
    - any of the following: `string`, `null`
  - `finishedAt` (`getRun.response.200.run.finishedAt`; any of, optional)
    - any of the following: `string`, `null`
  - `runAt` (`getRun.response.200.run.runAt`; any of, optional)
    - any of the following: `string`, `null`
  - `nextAttemptAt` (`getRun.response.200.run.nextAttemptAt`; any of, optional)
    - any of the following: `string`, `null`
  - `waitUntil` (`getRun.response.200.run.waitUntil`; string, optional) — Planned resume time for Wait Until or the reply deadline for Wait for Reply.
    - format: `date-time`
  - `waitStartedAt` (`getRun.response.200.run.waitStartedAt`; string | null, optional) — Time when a wait run entered its pause, or null until it has paused.
    - format: `date-time`
  - `waitResumedAt` (`getRun.response.200.run.waitResumedAt`; string | null, optional) — Time when a wait run resumed, or null before resumption.
    - format: `date-time`
  - `replyTimeoutSeconds` (`getRun.response.200.run.replyTimeoutSeconds`; integer, optional) — Timeout applied to this Wait for Reply run.
    - maximum: `2592000` · minimum: `5`
  - `waitOutcome` (`getRun.response.200.run.waitOutcome`; string | null, optional) — Outcome of a Wait for Reply run. Null until the run resumes.
    - one of `"reply"`, `"timeout"`, `null`
  - `reply` (`getRun.response.200.run.reply`; object | null, optional) — The accepted reply on a full Wait for Reply run record. Null while there is no accepted reply, including after timeout. Run summaries omit this field.
    - `receivedAt` (`getRun.response.200.run.reply.receivedAt`; string, required)
      - format: `date-time`
    - `payload` (`getRun.response.200.run.reply.payload`; object, required)
  - `durationMs` (`getRun.response.200.run.durationMs`; any of, optional)
    - any of the following: `number`, `null`
  - `previousRunId` (`getRun.response.200.run.previousRunId`; any of, optional)
    - any of the following: `string`, `null`
- `attempts` (`getRun.response.200.attempts`; array of object, required)
  - `number` (`getRun.response.200.attempts.number`; integer, required)
    - maximum: `5` · minimum: `0`
  - `status` (`getRun.response.200.attempts.status`; string, required)
    - one of `"scheduled"`, `"queued"`, `"running"`, `"retrying"`, `"succeeded"`, `"failed"`, `"cancelled"`
  - `startedAt` (`getRun.response.200.attempts.startedAt`; string, required)
    - format: `date-time`
  - `finishedAt` (`getRun.response.200.attempts.finishedAt`; any of, optional)
    - any of the following: `string`, `null`
  - `statusCode` (`getRun.response.200.attempts.statusCode`; any of, optional)
    - any of the following: `integer`, `null`
  - `durationMs` (`getRun.response.200.attempts.durationMs`; any of, optional)
    - any of the following: `number`, `null`
  - `error` (`getRun.response.200.attempts.error`; any of, optional)
    - any of the following: `string`, `null`
- `events` (`getRun.response.200.events`; array of object, required)
  - `id` (`getRun.response.200.events.id`; string, required)
  - `type` (`getRun.response.200.events.type`; string, required) — Recorded event type. Wait checkpoints emit wait.started followed by wait.resumed if they resume. Wait for Reply records wait.reply_received or wait.timed_out before wait.resumed.
  - `time` (`getRun.response.200.events.time`; string, required)
    - format: `date-time`
  - `attempt` (`getRun.response.200.events.attempt`; any of, optional)
    - any of the following: `integer`, `null`
  - `detail` (`getRun.response.200.events.detail`; string | null, optional)

### 401

Authentication is required

#### Example

```json
{
  "error": "string"
}
```

- `error` (`getRun.response.401.error`; string, required)

### 403

The credential lacks permission

#### Example

```json
{
  "error": "string"
}
```

- `error` (`getRun.response.403.error`; string, required)

### 404

Resource not found in this environment

#### Example

```json
{
  "error": "string"
}
```

- `error` (`getRun.response.404.error`; string, required)


Source: https://simplcron.dev/docs/api/get-run/index.md
