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

# Audit Trail

> Who changed the governance configuration, and what they changed.

**Who may call it:** admin or auditor. A workspace API key is refused here: this is an act that belongs to a named person.



## OpenAPI

````yaml /api/openapi.json get /v1/audit
openapi: 3.1.0
info:
  title: RotaGrant API
  version: 0.1.0
  description: >-
    The HTTP API of a RotaGrant deployment, made from the product's own route
    definitions at the commit named in `x-rotascale-source`. Nothing here is
    written by hand.


    There is no shared endpoint. RotaGrant runs in your environment, and your
    deployment serves its own copy of this description at `/api/docs`. That copy
    is the authority on what your version has and which features are switched
    on; this one is the reference for one commit of the main line. The version
    is 0.1.0: routes and shapes can still change.


    Every route says who may call it. Most need a bearer token from the identity
    provider your deployment uses, held by a person with the role named. The
    routes an SDK calls also accept a workspace API key. A few are open, and say
    why.
servers:
  - url: https://{deployment}
    description: Your own deployment. There is no shared endpoint.
    variables:
      deployment:
        default: rotagrant.internal.example
        description: The host your deployment answers on.
security: []
paths:
  /v1/audit:
    get:
      tags:
        - Audit
      summary: Audit Trail
      description: >-
        Who changed the governance configuration, and what they changed.


        **Who may call it:** admin or auditor. A workspace API key is refused
        here: this is an act that belongs to a named person.
      operationId: audit_trail_v1_audit_get
      parameters:
        - name: target_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Target Type
        - name: target_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Target Id
        - name: actor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Actor
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: matches actor, action, target or reason
            title: Q
          description: matches actor, action, target or reason
        - name: action
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: exactly this action
            title: Action
          description: exactly this action
        - name: since
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: at or after this time
            title: Since
          description: at or after this time
        - name: until
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: at or before this time
            title: Until
          description: at or before this time
        - name: group
          in: query
          required: false
          schema:
            type: boolean
            description: fold each run of one actor doing one thing into its newest entry
            default: false
            title: Group
          description: fold each run of one actor doing one thing into its newest entry
        - name: tampered
          in: query
          required: false
          schema:
            type: boolean
            description: only entries that no longer match their own digest
            default: false
            title: Tampered
          description: only entries that no longer match their own digest
        - name: sort
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: column, '-' prefix for descending
            title: Sort
          description: column, '-' prefix for descending
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            default: 200
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerToken: []
components:
  schemas:
    AuditOut:
      properties:
        events:
          items:
            $ref: '#/components/schemas/AuditEventOut'
          type: array
          title: Events
        count:
          type: integer
          title: Count
        total:
          type: integer
          title: Total
          default: 0
        limit:
          type: integer
          title: Limit
          default: 200
        offset:
          type: integer
          title: Offset
          default: 0
        has_more:
          type: boolean
          title: Has More
          default: false
        all_intact:
          type: boolean
          title: All Intact
        tampered_total:
          type: integer
          title: Tampered Total
          default: 0
        missing_total:
          type: integer
          title: Missing Total
          default: 0
        missing_first:
          items:
            type: integer
          type: array
          title: Missing First
          default: []
        broken_seals:
          items:
            type: string
          type: array
          title: Broken Seals
          default: []
        entries_total:
          type: integer
          title: Entries Total
          default: 0
        sealed_through:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sealed Through
        sealed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sealed At
        unsealed_total:
          type: integer
          title: Unsealed Total
          default: 0
        legacy_total:
          type: integer
          title: Legacy Total
          default: 0
        seals_total:
          type: integer
          title: Seals Total
          default: 0
        key_custody:
          anyOf:
            - type: string
            - type: 'null'
          title: Key Custody
        anchor:
          type: string
          title: Anchor
          default: export
        timestamped_total:
          type: integer
          title: Timestamped Total
          default: 0
        timestamped_late_total:
          type: integer
          title: Timestamped Late Total
          default: 0
        timestamped_late_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Timestamped Late Until
        untimestamped_total:
          type: integer
          title: Untimestamped Total
          default: 0
        timestamps_unchecked:
          anyOf:
            - type: string
            - type: 'null'
          title: Timestamps Unchecked
        timestamp_signers:
          items:
            type: string
          type: array
          title: Timestamp Signers
          default: []
        head_seal:
          anyOf:
            - type: integer
            - type: 'null'
          title: Head Seal
        head_fingerprint:
          anyOf:
            - type: string
            - type: 'null'
          title: Head Fingerprint
      type: object
      required:
        - events
        - count
        - all_intact
      title: AuditOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AuditEventOut:
      properties:
        id:
          type: string
          title: Id
        actor:
          type: string
          title: Actor
        actor_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor Email
        actor_roles:
          items:
            type: string
          type: array
          title: Actor Roles
        action:
          type: string
          title: Action
        target_type:
          type: string
          title: Target Type
        target_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Id
        before:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Before
        after:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: After
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        content_hash:
          type: string
          title: Content Hash
        intact:
          type: boolean
          title: Intact
        created_at:
          type: string
          format: date-time
          title: Created At
        count:
          type: integer
          title: Count
          default: 1
        first_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: First At
        same_reason:
          type: boolean
          title: Same Reason
          default: true
        seq:
          type: integer
          title: Seq
          default: 0
        sealed:
          type: boolean
          title: Sealed
          default: false
        digest_version:
          type: integer
          title: Digest Version
          default: 1
      type: object
      required:
        - id
        - actor
        - actor_roles
        - action
        - target_type
        - content_hash
        - intact
        - created_at
      title: AuditEventOut
      description: One change a PERSON made to the rules themselves.
    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:
    bearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A token from the identity provider your deployment federates with. It
        identifies a person; their roles in the workspace decide what they may
        do.

````

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