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

# List activity logs



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/logs.yaml get /api/logs
openapi: 3.0.3
info:
  title: Insforge Logs API
  version: 1.0.0
servers: []
security: []
paths:
  /api/logs:
    get:
      tags:
        - Admin
      summary: List activity logs
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            default: 100
        - name: offset
          in: query
          schema:
            type: integer
            default: 0
        - name: action
          in: query
          schema:
            type: string
            enum:
              - INSERT
              - UPDATE
              - DELETE
              - LOGIN
          description: Filter by action type
        - name: table
          in: query
          schema:
            type: string
      responses:
        '200':
          description: List of logs with pagination
          headers:
            X-Total-Count:
              schema:
                type: integer
              description: Total number of logs
            X-Page:
              schema:
                type: integer
              description: Current page number
            X-Page-Size:
              schema:
                type: integer
              description: Number of items per page
            X-Total-Pages:
              schema:
                type: integer
              description: Total number of pages
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    timestamp:
                      type: string
                      format: date-time
                    action:
                      type: string
                      enum:
                        - INSERT
                        - UPDATE
                        - DELETE
                        - LOGIN
                    table:
                      type: string
                      nullable: true
                    record_id:
                      type: string
                      nullable: true
                    user_id:
                      type: string
                    details:
                      type: object
                      nullable: true
              example:
                - id: log-123
                  timestamp: '2024-01-21T10:30:00Z'
                  action: INSERT
                  table: posts
                  record_id: post-456
                  user_id: user-789
                  details:
                    title: New Post
                    author: John Doe
                - id: log-124
                  timestamp: '2024-01-21T10:31:00Z'
                  action: LOGIN
                  table: null
                  record_id: null
                  user_id: user-789
                  details:
                    ip: 192.168.1.1
                    user_agent: Mozilla/5.0...
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````