---
title: "List autofix history"
method: GET
path: "/autofix/history"
---

# List autofix history

`GET /autofix/history`

## Request

- Base URL: `https://app.aikido.dev/api/public/v1`
- URL: `https://app.aikido.dev/api/public/v1/autofix/history`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://app.aikido.io/api/oauth/token` scopes: `autofix:read`

Returns a paginated list of autofix tasks in your account. Use the header X-Has-Next-Page for pagination.

## Query parameters

- `page` integer
- `per_page` integer

## Response `200`

A list of autofix history items

- object[]
  - `id` integer, required: The autofix task ID.
  - `type` 'dependency' | 'container' | 'pentest' | 'code_audit' | 'iac' | 'sast' | 'zen' | 'lockfile', required: The type of autofix task.
  - `status` 'creating' | 'preview_available' | 'preview_failed' | 'autofix_failed' | 'pr_open' | 'pr_merged' | 'pr_closed' | 'pr_created' | 'no_fix', required: The current status of the autofix task.
  - `triggered_by` object, required
    - `type` 'automatic' | 'user', required: Whether the autofix was triggered automatically by Aikido or by a user.
    - `user_id` integer, required: The Aikido user ID of the user who triggered the autofix. -1 for automatic triggers or unknown users.
  - `autofix_target` object, required
    - `code_repo_id` union, required: The code repository ID in Aikido.
      - integer
      - string
    - `location` string, required: The file path or lockfile location targeted by the autofix.
    - `title` string, required: A human readable title describing the autofix target.
  - `triggered_at` integer, required: Unix timestamp when the autofix task was triggered.
  - `finished_at` integer, nullable, required: Unix timestamp when the autofix task finished. Null while the task is still running.
  - `pull_request` object, nullable, required: The pull request created by the autofix. Can be null if no pull request was created.
    - `url` string, required: The URL of the pull request created by the autofix.
    - `close_reason` 'unknown' | 'superseded_by_user_request' | 'superseded_by_cron' | 'issue_resolved', required: Why Aikido closed this pull request. `superseded_by_user_request` and `superseded_by_cron` mean it was replaced by a newer autofix pull request, `issue_resolved` means the linked issues were already resolved elsewhere, and `unknown` means the pull request is still open or was closed outside of Aikido.

---

[API](https://skmtc.dev/aikido/apis/aikido-security-api-documentation.md) - [All operations](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/aikido/apis/aikido-security-api-documentation/revisions/da8691338133?raw)
