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

# List Impacts For Policy

> Every impact on one policy, newest first — the policy detail view's list.

Unlike the org-wide list, resolved rows are NOT excluded by default: this
is the history view, with resolved rows collapsed client-side. Archived
policies are still excluded (:class:`PolicyImpactService`'s
``_base_query`` backs both this and the org-wide list identically) —
an archived policy's detail page must not surface flags the org view
is hiding.

**Capped, and the cap is not an error.** At most
:data:`~policy_service.services.policy_impact.PER_POLICY_LIST_CAP` rows are
returned, newest first. Resolved impacts are kept indefinitely as an audit
trail and each carries a non-trivial ``detail`` blob, so an uncapped response
would grow without limit. Truncation is therefore possible and is NOT
signalled — this is a detail view where the newest rows are what matter. For
full history, page the org-wide ``GET /policy-impacts?policy_id=`` instead.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/policy/v2/policies/{policy_id}/impacts
openapi: 3.1.0
info:
  title: Barndoor.ai Public API
  description: Unified public API specification for Barndoor.ai platform
  version: 2.18.0
servers:
  - url: https://{host}
    description: Barndoor public API
    variables:
      host:
        default: platform.barndoor.ai
        description: >-
          The host serving your Barndoor deployment. Defaults to production;
          override it for another environment or a dedicated deployment.
security:
  - ApiKey: []
  - OAuth2:
      - openid
      - profile
      - email
tags:
  - name: dlp
    x-group: Data Control Center
  - name: identity
    x-group: Identity
  - name: llm-gateway
    x-group: LLM Gateway
  - name: notification
    x-group: Notifications
  - name: policy
    x-group: Policies
  - name: registry
    x-group: MCP Gateway
  - name: system-management
    x-group: Log Exports
paths:
  /api/policy/v2/policies/{policy_id}/impacts:
    get:
      tags:
        - policy
      summary: List Impacts For Policy
      description: >-
        Every impact on one policy, newest first — the policy detail view's
        list.


        Unlike the org-wide list, resolved rows are NOT excluded by default:
        this

        is the history view, with resolved rows collapsed client-side. Archived

        policies are still excluded (:class:`PolicyImpactService`'s

        ``_base_query`` backs both this and the org-wide list identically) —

        an archived policy's detail page must not surface flags the org view

        is hiding.


        **Capped, and the cap is not an error.** At most

        :data:`~policy_service.services.policy_impact.PER_POLICY_LIST_CAP` rows
        are

        returned, newest first. Resolved impacts are kept indefinitely as an
        audit

        trail and each carries a non-trivial ``detail`` blob, so an uncapped
        response

        would grow without limit. Truncation is therefore possible and is NOT

        signalled — this is a detail view where the newest rows are what matter.
        For

        full history, page the org-wide ``GET /policy-impacts?policy_id=``
        instead.
      operationId: list_policy_impacts
      parameters:
        - name: policy_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Policy Id
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
              - type: 'null'
            description: 'Filter by status. Unset: every status (history view).'
            title: Status
          description: 'Filter by status. Unset: every status (history view).'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PolicyImpactSummary'
                title: Response List Policy Impacts
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PolicyImpactSummary:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        policy_id:
          type: string
          format: uuid
          title: Policy Id
        mcp_server_id:
          type: string
          title: Mcp Server Id
        change_kind:
          type: string
          title: Change Kind
        tool_name:
          type: string
          title: Tool Name
        severity:
          type: string
          title: Severity
        status:
          type: string
          title: Status
        from_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: From Version
        to_version:
          type: integer
          title: To Version
        snapshot_id:
          type: string
          format: uuid
          title: Snapshot Id
        policy_status_at_eval:
          type: string
          title: Policy Status At Eval
        detail:
          additionalProperties: true
          type: object
          title: Detail
        acknowledged_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Acknowledged At
        acknowledged_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Acknowledged By
        resolved_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Resolved At
        resolved_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolved By
        resolution:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolution
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - policy_id
        - mcp_server_id
        - change_kind
        - tool_name
        - severity
        - status
        - to_version
        - snapshot_id
        - policy_status_at_eval
        - created_at
      title: PolicyImpactSummary
      description: >-
        One ``policy.policy_impact`` row, as returned by the impact list/detail
        routes.


        Built with ``model_validate(row, from_attributes=True)`` directly off
        the ORM

        row — the field set below is a straight projection of

        ``policy_service.db.policy_impact.PolicyImpact``, so there is no
        hand-mapping

        to drift out of sync.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        A Barndoor API key, sent as `Authorization: Bearer <key>`. Keys are
        prefixed `bdai_` and are opaque — do not attempt to decode one.
        Interchangeable with an OAuth 2.0 access token.
    OAuth2:
      type: oauth2
      x-issuer: https://auth.barndoor.ai/realms/barndoor
      description: >-
        An OAuth 2.0 access token from Barndoor's identity provider, sent as
        `Authorization: Bearer <token>`. Public clients must use PKCE.
        Interchangeable with an API key.
      flows:
        authorizationCode:
          authorizationUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/auth
          tokenUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/token
          scopes:
            openid: Issue an OIDC ID token identifying the caller.
            profile: Read the caller's basic profile claims.
            email: Read the caller's email address.
            offline_access: Issue a refresh token. Optional — no operation requires it.
        clientCredentials:
          tokenUrl: >-
            https://auth.barndoor.ai/realms/barndoor/protocol/openid-connect/token
          scopes:
            openid: Issue an OIDC ID token identifying the caller.
            profile: Read the caller's basic profile claims.
            email: Read the caller's email address.
            offline_access: Issue a refresh token. Optional — no operation requires it.

````

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