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

# Get audit trail for a resource

> Returns all audit logs for a specific resource



## OpenAPI

````yaml /api-reference/openapi.json get /admin/audit-logs/resource/{resource}/{resourceId}
openapi: 3.0.0
info:
  title: EngageFabric API
  description: >-
    EngageFabric is a multi-tenant SaaS gamification framework. This API
    provides endpoints for managing players, tracking events, quests,
    adventures, leaderboards, lobbies, and real-time features.
  version: 1.0.0
  contact:
    name: EngageFabric Support
    url: https://engagefabric.com
    email: support@engagefabric.com
  license:
    name: Proprietary
    url: https://engagefabric.com/terms
servers:
  - url: https://api.engagefabric.com
    description: Production
  - url: http://localhost:3000
    description: Development
security: []
tags:
  - name: auth
    description: Authentication endpoints
  - name: tenants
    description: Tenant management
  - name: projects
    description: Project management
  - name: players
    description: Player management and game state
  - name: events
    description: Event ingestion and tracking
  - name: quests
    description: Quest management and progress
  - name: adventures
    description: Adventure/season management
  - name: leaderboards
    description: Leaderboard rankings
  - name: lobbies
    description: Multiplayer lobby management
  - name: chat
    description: Real-time chat
  - name: rules
    description: Rules engine configuration
paths:
  /admin/audit-logs/resource/{resource}/{resourceId}:
    get:
      tags:
        - Admin - Audit Logs
      summary: Get audit trail for a resource
      description: Returns all audit logs for a specific resource
      operationId: AuditLogController_getResourceAuditTrail
      parameters:
        - name: resource
          required: true
          in: path
          description: Resource type (e.g., player, quest)
          schema:
            type: string
        - name: resourceId
          required: true
          in: path
          description: Resource ID
          schema:
            type: string
        - name: limit
          required: true
          in: query
          schema:
            type: number
      responses:
        '200':
          description: Resource audit trail
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AuditLogDto'
      security:
        - bearer: []
components:
  schemas:
    AuditLogDto:
      type: object
      properties:
        id:
          type: string
        tenantId:
          type: string
        projectId:
          type: string
        actorType:
          type: string
          enum:
            - USER
            - API_KEY
            - SYSTEM
            - WEBHOOK
            - PLAYER
        actorId:
          type: string
        actorIp:
          type: string
        eventType:
          type: string
          enum:
            - AUTH_LOGIN
            - AUTH_LOGOUT
            - AUTH_FAILED_LOGIN
            - AUTH_TOKEN_CREATED
            - AUTH_TOKEN_REVOKED
            - TENANT_CREATED
            - TENANT_UPDATED
            - TENANT_DELETED
            - PROJECT_CREATED
            - PROJECT_UPDATED
            - PROJECT_DELETED
            - PROJECT_TIER_CHANGED
            - PLAYER_CREATED
            - PLAYER_UPDATED
            - PLAYER_DELETED
            - PLAYER_BANNED
            - PLAYER_UNBANNED
            - XP_GRANTED
            - LEVEL_UP
            - CURRENCY_GRANTED
            - CURRENCY_DEDUCTED
            - BADGE_AWARDED
            - LIVES_UPDATED
            - RULE_CREATED
            - RULE_UPDATED
            - RULE_DELETED
            - RULE_PUBLISHED
            - RULE_EXECUTED
            - QUEST_CREATED
            - QUEST_UPDATED
            - QUEST_COMPLETED
            - ADVENTURE_CREATED
            - ADVENTURE_STARTED
            - ADVENTURE_COMPLETED
            - RATE_LIMIT_EXCEEDED
            - RATE_LIMIT_RESET
            - RATE_LIMIT_OVERRIDE_CREATED
            - IP_BLOCKED
            - IP_UNBLOCKED
            - ABUSE_DETECTED
            - ADMIN_OVERRIDE
            - ADMIN_DATA_EXPORT
            - ADMIN_CONFIG_CHANGE
            - ADMIN_MANUAL_ADJUSTMENT
            - SECURITY_SUSPICIOUS_ACTIVITY
            - SECURITY_API_KEY_LEAKED
            - SECURITY_UNAUTHORIZED_ACCESS
            - SECURITY_IP_BLOCKED
            - SECURITY_IP_UNBLOCKED
        eventCategory:
          type: string
          enum:
            - AUTHENTICATION
            - AUTHORIZATION
            - DATA_ACCESS
            - DATA_MUTATION
            - CONFIGURATION
            - SECURITY
            - COMPLIANCE
            - ADMIN_ACTION
            - SYSTEM_EVENT
        action:
          type: string
        resource:
          type: string
        resourceId:
          type: string
        details:
          type: object
        changes:
          type: object
        metadata:
          type: object
        status:
          type: string
          enum:
            - SUCCESS
            - FAILURE
            - PARTIAL
        errorMessage:
          type: string
        severity:
          type: string
          enum:
            - DEBUG
            - INFO
            - WARNING
            - ERROR
            - CRITICAL
        isSuspicious:
          type: boolean
        flagReason:
          type: string
        createdAt:
          format: date-time
          type: string
      required:
        - id
        - actorType
        - actorId
        - eventType
        - eventCategory
        - action
        - resource
        - status
        - severity
        - isSuspicious
        - createdAt

````