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

# Get unified logs



## OpenAPI

````yaml /openapi/v3.yaml get /logs/unified
openapi: 3.0.0
info:
  title: Qanapi API v3
  version: 3.0.0
  description: Qanapi API version 3
servers:
  - url: https://{subdomain}.qanapi.cloud/api/v3
    description: The Qanapi API server
    variables:
      subdomain:
        default: ''
        description: Customer-specific subdomain.
security:
  - ApiKey: []
paths:
  /logs/unified:
    get:
      summary: Get unified logs
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
        - name: per_page
          in: query
          schema:
            type: integer
            default: 15
        - name: request_id
          in: query
          schema:
            type: string
        - name: action
          in: query
          schema:
            type: string
        - name: description
          in: query
          schema:
            type: string
        - name: causer_email
          in: query
          schema:
            type: string
        - name: details
          in: query
          schema:
            type: string
        - name: log_type
          in: query
          schema:
            type: string
            enum:
              - activity
              - api
              - usage
        - name: status_code
          in: query
          schema:
            type: integer
        - name: user_id
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: Unified logs
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponse'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/UnifiedLog'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ForbiddenAndUnauthorized'
components:
  schemas:
    PaginatedResponse:
      type: object
      properties:
        current_page:
          type: integer
        data:
          type: array
          items:
            type: object
        first_page_url:
          type: string
          format: uri
        from:
          type: integer
          nullable: true
        last_page:
          type: integer
        last_page_url:
          type: string
          format: uri
        links:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                nullable: true
              label:
                type: string
              page:
                type: integer
                nullable: true
              active:
                type: boolean
        next_page_url:
          type: string
          format: uri
          nullable: true
        path:
          type: string
        per_page:
          type: integer
        prev_page_url:
          type: string
          format: uri
          nullable: true
        to:
          type: integer
          nullable: true
        total:
          type: integer
    UnifiedLog:
      type: object
      properties:
        log_type:
          type: string
          enum:
            - activity
            - api
            - usage
        action:
          type: string
        description:
          type: string
        details:
          type: object
          nullable: true
        causer_email:
          type: string
          format: email
          nullable: true
        status_code:
          type: integer
          nullable: true
        request_id:
          type: string
          nullable: true
        timestamp:
          type: string
          format: date-time
        configuration:
          $ref: '#/components/schemas/Configuration'
        user:
          $ref: '#/components/schemas/User'
        full_log:
          oneOf:
            - $ref: '#/components/schemas/ActivityLog'
            - $ref: '#/components/schemas/ApiLog'
            - $ref: '#/components/schemas/QanapiFlowLog'
    Configuration:
      type: object
      required:
        - id
        - name
        - type
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        type:
          type: string
        values:
          type: array
          items:
            $ref: '#/components/schemas/Value'
    User:
      type: object
      required:
        - id
        - name
        - email
      properties:
        id:
          type: integer
        name:
          type: string
        email:
          type: string
          format: email
        two_factor_enabled:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        roles:
          type: array
          items:
            $ref: '#/components/schemas/Role'
    ActivityLog:
      type: object
      properties:
        action:
          type: string
        description:
          type: string
        ip:
          type: string
          nullable: true
        when:
          type: string
        timestamp:
          type: string
          format: date-time
        user:
          $ref: '#/components/schemas/User'
    ApiLog:
      type: object
      properties:
        api_key_id:
          type: integer
        domain:
          type: string
        endpoint:
          type: string
        method:
          type: string
        status_code:
          type: integer
        configuration_id:
          type: integer
          nullable: true
        request_id:
          type: string
          nullable: true
        proxied:
          type: boolean
        proxied_to:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        api_key:
          $ref: '#/components/schemas/ApiKey'
    QanapiFlowLog:
      type: object
      properties:
        configuration_id:
          type: integer
          nullable: true
        type:
          type: string
        action:
          type: string
        email:
          type: string
          format: email
          nullable: true
        request_id:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: An error occurred.
    Value:
      type: object
      required:
        - key
        - value
      properties:
        key:
          type: string
        value:
          type: string
    Role:
      type: object
      required:
        - name
      properties:
        name:
          type: string
        description:
          type: string
          nullable: true
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/Permission'
    ApiKey:
      type: object
      required:
        - id
        - prefix
        - status
      properties:
        id:
          type: string
          example: '1'
        prefix:
          type: string
          example: qapi_
        status:
          type: string
          enum:
            - active
            - revoked
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        revoked_at:
          type: string
          format: date-time
          nullable: true
        user:
          $ref: '#/components/schemas/User'
        configurations:
          type: array
          items:
            $ref: '#/components/schemas/Configuration'
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/Permission'
    Permission:
      type: object
      required:
        - name
      properties:
        name:
          type: string
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Unauthorized.
    ForbiddenAndUnauthorized:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            forbidden:
              summary: Forbidden
              value:
                message: User does not have the right permissions.
            unauthorized:
              summary: Unauthorized
              value:
                message: Unauthorized.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Qanapi-Authorization

````