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

# Get logs from one source



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/logs.yaml get /api/logs/{source}
openapi: 3.0.3
info:
  title: Insforge Logs API
  version: 1.0.0
servers: []
security: []
paths:
  /api/logs/{source}:
    get:
      tags:
        - Admin
      summary: Get logs from one source
      parameters:
        - name: source
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            default: 100
        - name: before_timestamp
          in: query
          schema:
            type: string
            format: date-time
          description: Return entries older than this timestamp
      responses:
        '200':
          description: Log entries for the source
          content:
            application/json:
              schema:
                type: object
                required:
                  - logs
                  - total
                properties:
                  logs:
                    type: array
                    items:
                      $ref: '#/components/schemas/LogEntry'
                  total:
                    type: integer
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    LogEntry:
      type: object
      required:
        - id
        - eventMessage
        - timestamp
        - body
      properties:
        id:
          type: string
        eventMessage:
          type: string
        timestamp:
          type: string
        body:
          type: object
          additionalProperties: true
        source:
          type: string
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
          description: Error code for programmatic handling
        message:
          type: string
          description: Human-readable error message
        statusCode:
          type: integer
          description: HTTP status code
        nextActions:
          type: string
          description: Suggested action to resolve the error
  responses:
    Unauthorized:
      description: Missing or invalid admin credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: AUTH_INVALID_CREDENTIALS
            message: Unauthorized
            statusCode: 401
    Forbidden:
      description: Authenticated, but the token is not a project_admin
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: AUTH_UNAUTHORIZED
            message: Admin access required
            statusCode: 403
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````