---
title: "List attempts for run"
method: GET
path: "/v4/automations/jobs/{job_id}/runs/{run_id}/attempts"
tags: ["v4", "Automations"]
---

# List attempts for run

`GET /v4/automations/jobs/{job_id}/runs/{run_id}/attempts`

## Request

- Base URL: `https://api.definite.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.definite.app/v4/automations/jobs/{job_id}/runs/{run_id}/attempts`
- Auth: none declared
- TypeScript: <https://skmtc.dev/definite/apis/defapi/docs/v4/automations/jobs/:job_id/runs/:run_id/attempts/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `job_id` union, required
  - string, uuid
  - string
- `run_id` union, required
  - string, uuid
  - string

## Query parameters

- `limit` integer
- `offset` integer
- `orderedBy` 'created_at'
- `ascending` boolean

## Response `200`

Success

- SuccessResponsePaginatedAutomationRunAttemptsSchema
  - `success` true, required: Flag for it request was successful
  - `data` PaginatedAutomationRunAttemptsSchema, required
    - `data` AutomationRunAttemptsSchema[], required: List of items
      - `id` integer: Run attempt ID
      - `run_id` union, required: Run ID
        - string, uuid
        - string
      - `attempt_number` integer, required: Attempt number
      - `status` 'running' | 'success' | 'failure' | 'expired', required: Attempt status
      - `started_at` string, date-time, nullable: Attempt started timestamp
      - `completed_at` string, date-time, nullable: Attempt completed timestamp
      - `expires_at` string, date-time: Attempt expiration timestamp
      - `expired_at` string, date-time, nullable: Attempt expired timestamp
      - `error_message` string, nullable: Error message if failed
      - `metadata` object, nullable: General-purpose metadata for the attempt
      - `created_at` string, date-time: Run attempt created at timestamp
    - `limit` integer, required: Items per page
    - `offset` integer, required: Current offset
    - `orderedBy` string, required: Sort field
    - `ascending` boolean, required: Sort direction (true = ascending)
    - `total` integer, required: Total number of items matching the query across all pages
  - `meta` ResponseMeta
    - `requestId` string: Unique request identifier for tracing
    - `timestamp` string, date-time: Response timestamp (UTC)
    - `durationMs` integer, nullable: Request processing time in milliseconds

## Other responses

- `401`: Auth Invalid Token
- `403`: Forbidden Insufficient Permissions
- `404`: Resource Not Found
- `422`: Validation Failed
- `426`: Business Quota Exceeded
- `500`: Internal Error

---

[API](https://skmtc.dev/definite/apis/defapi.md) - [All operations](https://skmtc.dev/definite/apis/defapi/llms.txt) - [OpenAPI document](https://skmtc.dev/definite/apis/defapi/revisions/5ea378187147?raw)
