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



## OpenAPI

````yaml /openapi/v3.yaml get /logs/activity
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/activity:
    get:
      summary: Get activity logs
      parameters:
        - name: page
          in: query
          schema:
            type: integer
            default: 1
        - name: per_page
          in: query
          schema:
            type: integer
            default: 15
        - name: user
          in: query
          description: User ID filter
          schema:
            type: integer
        - name: logName
          in: query
          schema:
            type: string
        - name: user_id
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: Activity logs
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponse'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/ActivityLog'
        '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
    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'
    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'
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: An error occurred.
    Role:
      type: object
      required:
        - name
      properties:
        name:
          type: string
        description:
          type: string
          nullable: true
        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

````