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

# List Audit Logs

> Inventory write history, newest first.



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json get /api/admin/inventory/audit-logs
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/admin/inventory/audit-logs:
    get:
      tags:
        - admin-inventory
      summary: List Audit Logs
      description: Inventory write history, newest first.
      operationId: list_audit_logs_api_admin_inventory_audit_logs_get
      parameters:
        - name: subjectId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Cluster, node, vendor, tenant, site or contract id. Matches every
              event that touched it, not just those targeting it directly.
            title: Subjectid
          description: >-
            Cluster, node, vendor, tenant, site or contract id. Matches every
            event that touched it, not just those targeting it directly.
        - name: eventType
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: e.g. contract.update.
            title: Eventtype
          description: e.g. contract.update.
        - name: targetType
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: cluster, node, assignment, contract, vendor, site, tenant…
            title: Targettype
          description: cluster, node, assignment, contract, vendor, site, tenant…
        - name: userId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter to one acting admin.
            title: Userid
          description: Filter to one acting admin.
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Match against target name, event, or actor.
            title: Search
          description: Match against target name, event, or actor.
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Number of items to skip.
            default: 0
            title: Offset
          description: Number of items to skip.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Max items to return (1-100).
            default: 20
            title: Limit
          description: Max items to return (1-100).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GenericPaginationResponse_list_InventoryAuditEntry__
        '401':
          description: Authorization failed
        '403':
          description: Insufficient permissions
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    GenericPaginationResponse_list_InventoryAuditEntry__:
      properties:
        total_count:
          type: integer
          title: Total Count
          description: Total number of items available in the dataset
          default: 0
        offset:
          type: integer
          minimum: 0
          title: Offset
          description: Number of items to skip before starting to collect the result set
          default: 0
        limit:
          type: integer
          minimum: 0
          title: Limit
          description: Maximum number of items to return
          default: 100
        data:
          items:
            $ref: '#/components/schemas/InventoryAuditEntry'
          type: array
          title: Data
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Response status
      type: object
      required:
        - data
      title: GenericPaginationResponse[list[InventoryAuditEntry]]
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    InventoryAuditEntry:
      properties:
        id:
          type: string
          title: Id
        operationId:
          type: string
          title: Operationid
        eventType:
          type: string
          title: Eventtype
        targetType:
          type: string
          title: Targettype
        targetId:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetid
        targetName:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetname
        status:
          type: string
          title: Status
        requestSummary:
          anyOf:
            - type: object
            - type: 'null'
          title: Requestsummary
        responseSummary:
          anyOf:
            - type: object
            - type: 'null'
          title: Responsesummary
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        userId:
          anyOf:
            - type: string
            - type: 'null'
          title: Userid
        triggeredBy:
          anyOf:
            - type: string
            - type: 'null'
          title: Triggeredby
        createdAt:
          type: string
          format: date-time
          title: Createdat
      type: object
      required:
        - id
        - operationId
        - eventType
        - targetType
        - status
        - createdAt
      title: InventoryAuditEntry
      description: 'One recorded inventory write: who, what, and what changed.'
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````