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

# List policy activity

> **Auth:** organization API key (`read` scope or higher) or a signed-in user.

Audit records of the policy and of its attachments to agents. `limit` defaults to `50` (maximum `200`). Any member can read it, unlike the organization audit log.



## OpenAPI

````yaml https://cp.xenovia.io/openapi.json get /api/v1/policies/{policy_id}/activity
openapi: 3.1.0
info:
  title: Xenovia Control Plane API
  version: 1.0.0
  description: >-
    Management API for agents, providers, policies, telemetry, alerts and
    organization settings.
servers:
  - url: https://cp.xenovia.io
    description: Production
security:
  - BearerAuth: []
paths:
  /api/v1/policies/{policy_id}/activity:
    get:
      tags:
        - policies
      summary: List policy activity
      description: >-
        **Auth:** organization API key (`read` scope or higher) or a signed-in
        user.


        Audit records of the policy and of its attachments to agents. `limit`
        defaults to `50` (maximum `200`). Any member can read it, unlike the
        organization audit log.
      operationId: list_policy_activity_route_api_v1_policies__policy_id__activity_get
      parameters:
        - name: policy_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Policy Id
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AuditLogRead'
                title: >-
                  Response List Policy Activity Route Api V1 Policies  Policy
                  Id  Activity Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AuditLogRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        recorded_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Recorded At
        org_id:
          type: string
          format: uuid
          title: Org Id
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        event_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Id
        event_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Event Version
        action:
          type: string
          title: Action
        result:
          anyOf:
            - type: string
            - type: 'null'
          title: Result
        source_service:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Service
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
        environment:
          anyOf:
            - type: string
            - type: 'null'
          title: Environment
        resource_type:
          type: string
          title: Resource Type
        resource_id:
          type: string
          title: Resource Id
        source_ip:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Ip
        client_ip:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Ip
        user_agent:
          anyOf:
            - type: string
            - type: 'null'
          title: User Agent
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        actor_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Type
        actor_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Id
        chain_seq:
          anyOf:
            - type: integer
            - type: 'null'
          title: Chain Seq
        prev_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Prev Hash
        row_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Row Hash
      type: object
      required:
        - id
        - created_at
        - org_id
        - user_id
        - event_id
        - event_version
        - action
        - result
        - source_service
        - request_id
        - environment
        - resource_type
        - resource_id
      title: AuditLogRead
    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:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token: an organization API key (`ak_…`) created under Settings →
        API Keys, or a dashboard user session token. Agent keys (`xe_…`) are not
        accepted here. Endpoints marked as user-only in their description reject
        organization keys with `403`.

````

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