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

# List remediation runs

> Requires `remediation.read`. Results are scoped to the authenticated tenant. This reference is generated from source; consult the authenticated live schema for deployment-specific availability. Search q is a literal case-insensitive substring of result summary, detection title/reference or Organization name, trimmed at the edges and bounded to 200 characters. It composes with status and Organization filters before counting and pagination. Sort accepts action, organization, detection, when or result with _asc/_desc. Text order ignores case; When uses start time then finish time, with missing dates last in both directions. Result orders the primary run-state label, not verification or simulation. Omitted sort preserves started-time descending, nulls last. Equal sort values use descending run UUID. This read does not execute, retry or roll back a run.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/remediations
openapi: 3.1.0
info:
  title: Alignr API
  version: 0.1.0
  description: >-
    Selected read operations. Generated from the Alignr application; no tenant
    data is included.
servers:
  - url: https://api.alignr.io
security: []
paths:
  /api/v1/remediations:
    get:
      tags:
        - Remediations
      summary: List remediation runs
      description: >-
        Requires `remediation.read`. Results are scoped to the authenticated
        tenant. This reference is generated from source; consult the
        authenticated live schema for deployment-specific availability. Search q
        is a literal case-insensitive substring of result summary, detection
        title/reference or Organization name, trimmed at the edges and bounded
        to 200 characters. It composes with status and Organization filters
        before counting and pagination. Sort accepts action, organization,
        detection, when or result with _asc/_desc. Text order ignores case; When
        uses start time then finish time, with missing dates last in both
        directions. Result orders the primary run-state label, not verification
        or simulation. Omitted sort preserves started-time descending, nulls
        last. Equal sort values use descending run UUID. This read does not
        execute, retry or roll back a run.
      operationId: list_runs_api_v1_remediations_get
      parameters:
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/RemediationRunStatus'
              - type: 'null'
            title: Status
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 200
              - type: 'null'
            title: Q
        - name: sort
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - action_asc
                  - action_desc
                  - organization_asc
                  - organization_desc
                  - detection_asc
                  - detection_desc
                  - when_asc
                  - when_desc
                  - result_asc
                  - result_desc
                type: string
              - type: 'null'
            title: Sort
        - name: organization_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Organization Id
        - name: organizationId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Organizationid
        - name: page
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 100000
                minimum: 1
              - type: 'null'
            description: 1-based page number
            title: Page
          description: 1-based page number
        - name: pageSize
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            description: Rows per page
            title: Pagesize
          description: Rows per page
        - name: limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 1
              - type: 'null'
            description: Rows per page (alias of pageSize)
            title: Limit
          description: Rows per page (alias of pageSize)
        - name: offset
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 20000000
                minimum: 0
              - type: 'null'
            description: Rows to skip (alias of page)
            title: Offset
          description: Rows to skip (alias of page)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemediationRunPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    RemediationRunStatus:
      type: string
      enum:
        - pending_approval
        - running
        - completed
        - partial
        - failed
        - rolled_back
      title: RemediationRunStatus
    RemediationRunPage:
      properties:
        items:
          items:
            $ref: '#/components/schemas/RemediationRunRead'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        pageSize:
          type: integer
          title: Pagesize
        totalPages:
          type: integer
          title: Totalpages
      type: object
      required:
        - items
        - total
        - page
        - pageSize
        - totalPages
      title: RemediationRunPage
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RemediationRunRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        tenantId:
          type: string
          format: uuid
          title: Tenantid
        detectionId:
          type: string
          format: uuid
          title: Detectionid
        planId:
          type: string
          format: uuid
          title: Planid
        actorKind:
          $ref: '#/components/schemas/ActorKind'
        actorId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Actorid
        status:
          $ref: '#/components/schemas/RemediationRunStatus'
        startedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Startedat
        finishedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finishedat
        reversibleUntil:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Reversibleuntil
        resultSummary:
          anyOf:
            - type: string
            - type: 'null'
          title: Resultsummary
        verificationStatus:
          type: string
          title: Verificationstatus
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        detectionRef:
          anyOf:
            - type: string
            - type: 'null'
          title: Detectionref
        detectionTitle:
          anyOf:
            - type: string
            - type: 'null'
          title: Detectiontitle
        organizationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Organizationid
        organizationName:
          anyOf:
            - type: string
            - type: 'null'
          title: Organizationname
        actorLabel:
          anyOf:
            - type: string
            - type: 'null'
          title: Actorlabel
        rollbackable:
          type: boolean
          title: Rollbackable
          default: false
        rollbackBlockedReason:
          anyOf:
            - type: string
            - type: 'null'
          title: Rollbackblockedreason
        simulated:
          type: boolean
          title: Simulated
          default: false
        steps:
          items:
            $ref: '#/components/schemas/RemediationRunStepRead'
          type: array
          title: Steps
          default: []
      type: object
      required:
        - id
        - tenantId
        - detectionId
        - planId
        - actorKind
        - status
        - verificationStatus
        - createdAt
        - updatedAt
      title: RemediationRunRead
      description: >-
        One run as `frontend/src/types/detections.ts` `RemediationRun` declares
        it.


        Deliberately absent: `rollback_token`. It is a single-use consumption
        token that

        authorises reversing the run (see
        `ledgr.core.security.constant_time_equals`'s

        intended use), so serialising it to any reader with `remediation.read`
        would hand

        every reader the capability the token exists to gate.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ActorKind:
      type: string
      enum:
        - human
        - agent
        - system
      title: ActorKind
    RemediationRunStepRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        runId:
          type: string
          format: uuid
          title: Runid
        stepId:
          type: string
          format: uuid
          title: Stepid
        status:
          $ref: '#/components/schemas/RemediationRunStepStatus'
        startedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Startedat
        finishedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Finishedat
        output:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Output
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        actionType:
          anyOf:
            - type: string
            - type: 'null'
          title: Actiontype
        position:
          anyOf:
            - type: integer
            - type: 'null'
          title: Position
        simulated:
          type: boolean
          title: Simulated
          default: false
        performedBy:
          anyOf:
            - type: string
            - type: 'null'
          title: Performedby
      type: object
      required:
        - id
        - runId
        - stepId
        - status
        - createdAt
        - updatedAt
      title: RemediationRunStepRead
      description: >-
        One executed step: the `remediation_run_steps` execution record merged
        with its

        `remediation_steps` definition, because the UI needs both — the
        description comes

        from the plan, the status and error from the run.


        Deliberately absent: `rollback_data`. It exists so `POST
        /remediations/{id}/rollback`

        can replay the inverse action server-side; nothing renders it, and
        shipping it is

        exposure without a consumer.
    RemediationRunStepStatus:
      type: string
      enum:
        - queued
        - running
        - done
        - failed
        - rolled_back
      title: RemediationRunStepStatus
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: An Alignr API key.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.