> ## 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

> List recorded admin operations, newest first, filtered by the query.



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json get /api/admin/audit-logs
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/admin/audit-logs:
    get:
      tags:
        - admin-audit-logs
      summary: List Audit Logs
      description: List recorded admin operations, newest first, filtered by the query.
      operationId: list_audit_logs_api_admin_audit_logs_get
      parameters:
        - name: resource
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter to a single resource type.
            title: Resource
          description: Filter to a single resource type.
        - name: userId
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter to a single acting admin.
            title: Userid
          description: Filter to a single acting admin.
        - name: keyPrefix
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter to a single API key.
            title: Keyprefix
          description: Filter to a single API key.
        - name: action
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter to a single action type.
            title: Action
          description: Filter to a single action type.
        - 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_AdminAuditLogEntry__
        '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_AdminAuditLogEntry__:
      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/AdminAuditLogEntry'
          type: array
          title: Data
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Response status
      type: object
      required:
        - data
      title: GenericPaginationResponse[list[AdminAuditLogEntry]]
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    AdminAuditLogEntry:
      properties:
        createdAt:
          type: string
          format: date-time
          title: Createdat
        userId:
          type: string
          title: Userid
        userEmail:
          anyOf:
            - type: string
            - type: 'null'
          title: Useremail
        adminRole:
          anyOf:
            - type: string
            - type: 'null'
          title: Adminrole
        keyPrefix:
          type: string
          title: Keyprefix
        resource:
          type: string
          title: Resource
        action:
          type: string
          title: Action
        granted:
          type: boolean
          title: Granted
        layer:
          anyOf:
            - type: string
            - type: 'null'
          title: Layer
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
        targetUserId:
          anyOf:
            - type: string
            - type: 'null'
          title: Targetuserid
        resourceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Resourceid
        method:
          anyOf:
            - type: string
            - type: 'null'
          title: Method
        path:
          anyOf:
            - type: string
            - type: 'null'
          title: Path
      type: object
      required:
        - createdAt
        - userId
        - keyPrefix
        - resource
        - action
        - granted
      title: AdminAuditLogEntry
      description: One recorded admin API/CLI operation (authorization decision + intent).
    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

````