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

# List logs

> Returns the audit logs for all events.



## OpenAPI

````yaml /generated/openapi-import-generated-2023-12-01.json get /logs
openapi: 3.1.0
info:
  title: Prequel Data Import
  description: Data Import API spec
  version: '2023-12-01'
servers:
  - url: https://api.prequel.co
    description: Cloud-hosted server (US)
  - url: https://eu-api.prequel.co
    description: Cloud-hosted server (EU)
  - url: https://{custom_host}
    description: Self-hosted Prequel API host
security:
  - ApiKeyAuth: []
paths:
  /logs:
    get:
      tags:
        - Monitoring & Logging
      summary: List logs
      description: Returns the audit logs for all events.
      operationId: list-logs
      parameters:
        - name: count
          in: query
          required: false
          description: Number of logs to return.
          schema:
            type: integer
        - name: offset
          in: query
          required: false
          description: Offset of logs to return.
          schema:
            type: integer
        - name: min_time
          in: query
          required: false
          description: Minimum timestamp of logs to return.
          schema:
            type: integer
        - name: event_type
          in: query
          required: false
          description: Type of event to filter logs by.
          schema:
            type: string
        - name: page_size
          in: query
          required: false
          description: Number of items to return per page.
          schema:
            type: integer
        - name: order
          in: query
          required: false
          description: Sort order for items
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: cursor
          in: query
          required: false
          description: >-
            Used for pagination - represents last page seen. Value is included
            in response when there is a next page.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  status:
                    type: string
                    const: success
                  data:
                    $ref: '#/components/schemas/ListEventLogResponse'
                    $schema: https://json-schema.org/draft/2020-12/schema
                    $id: >-
                      https://github.com/prequel-co/datafeed/internal/shared/api/models/list-event-log-response
                  message:
                    type: string
                  has_next:
                    type: boolean
                    description: Whether there are more items beyond this page.
                  next_url:
                    type: string
                    description: >-
                      Full URL to fetch the next page. Only present when
                      has_next is true.
                type: object
                required:
                  - status
                  - data
                  - message
                  - has_next
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ListEventLogResponse:
      properties:
        event_logs:
          items:
            $ref: '#/components/schemas/EventLog'
          type: array
      additionalProperties: false
      type: object
      required:
        - event_logs
    EventLog:
      properties:
        id:
          type: string
        created_at:
          type: string
          format: date-time
        event_type:
          type: string
          enum:
            - DESTINATION_ADD
            - DESTINATION_DELETE
            - DESTINATION_UPDATE
            - DESTINATION_ENABLE_ALL
            - DESTINATION_PAUSE_ALL
            - SOURCE_ADD
            - SOURCE_DELETE
            - SOURCE_UPDATE
            - RECIPIENT_ADD
            - RECIPIENT_DELETE
            - RECIPIENT_UPDATE
            - MODEL_ADD
            - MODEL_UPDATE
            - MODEL_DELETE
            - PRODUCT_ADD
            - PRODUCT_UPDATE
            - PRODUCT_DELETE
            - MAGIC_LINK_CREATE
            - MAGIC_LINK_DELETE
            - WEBHOOK_ADD
            - WEBHOOK_DELETE
            - WEBHOOK_UPDATE
            - RECIPIENT_SOURCE_CREDENTIAL_ADD
            - RECIPIENT_SOURCE_CREDENTIAL_DELETE
            - RECIPIENT_SOURCE_CREDENTIAL_UPDATE
            - API_KEY_ADD
            - API_KEY_DELETE
            - USER_ADD
            - USER_DELETE
            - TRANSFER_CANCELED
        resource_id:
          type: string
        actor:
          $ref: '#/components/schemas/Actor'
        previous_object: true
        object: true
      additionalProperties: false
      type: object
      required:
        - id
        - created_at
        - event_type
        - resource_id
        - actor
    ErrorResponse:
      properties:
        status:
          type: string
          const: error
        message:
          type: string
        data:
          type: 'null'
      type: object
      required:
        - status
        - message
    Actor:
      properties:
        actor_id:
          type: string
          description: The ID of the agent that triggered the event.
        type:
          type: string
          enum:
            - unknown
            - user
            - api_key
            - recipient
          description: The type of agent that triggered the event.
      additionalProperties: false
      type: object
      required:
        - actor_id
        - type
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````