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

# Get Logs



## OpenAPI

````yaml get /logs
openapi: 3.0.0
info:
  title: cozmox API
  description: Voice AI for developers.
  version: '1'
  contact: {}
servers:
  - description: Cozmox APIs
    url: https://api.cozmox.ai
  - url: https://api.cozmox.ai
security: []
tags: []
paths:
  /logs:
    get:
      tags:
        - Logs
      summary: Get Logs
      operationId: LoggingController_logsQuery
      parameters:
        - name: type
          required: false
          in: query
          description: This is the type of the log.
          schema:
            enum:
              - API
              - Webhook
              - Call
              - Provider
            type: string
        - name: webhookType
          required: false
          in: query
          description: This is the type of the webhook, given the log is from a webhook.
          schema:
            type: string
        - name: assistantId
          required: false
          in: query
          description: This is the ID of the assistant.
          schema:
            type: string
        - name: phoneNumberId
          required: false
          in: query
          description: This is the ID of the phone number.
          schema:
            type: string
        - name: customerId
          required: false
          in: query
          description: This is the ID of the customer.
          schema:
            type: string
        - name: squadId
          required: false
          in: query
          description: This is the ID of the squad.
          schema:
            type: string
        - name: callId
          required: false
          in: query
          description: This is the ID of the call.
          schema:
            type: string
        - name: page
          required: false
          in: query
          description: This is the page number to return. Defaults to 1.
          schema:
            minimum: 1
            type: number
        - name: sortOrder
          required: false
          in: query
          description: This is the sort order for pagination. Defaults to 'DESC'.
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: limit
          required: false
          in: query
          description: This is the maximum number of items to return. Defaults to 100.
          schema:
            minimum: 0
            maximum: 1000
            type: number
        - name: createdAtGt
          required: false
          in: query
          description: >-
            This will return items where the createdAt is greater than the
            specified value.
          schema:
            format: date-time
            type: string
        - name: createdAtLt
          required: false
          in: query
          description: >-
            This will return items where the createdAt is less than the
            specified value.
          schema:
            format: date-time
            type: string
        - name: createdAtGe
          required: false
          in: query
          description: >-
            This will return items where the createdAt is greater than or equal
            to the specified value.
          schema:
            format: date-time
            type: string
        - name: createdAtLe
          required: false
          in: query
          description: >-
            This will return items where the createdAt is less than or equal to
            the specified value.
          schema:
            format: date-time
            type: string
        - name: updatedAtGt
          required: false
          in: query
          description: >-
            This will return items where the updatedAt is greater than the
            specified value.
          schema:
            format: date-time
            type: string
        - name: updatedAtLt
          required: false
          in: query
          description: >-
            This will return items where the updatedAt is less than the
            specified value.
          schema:
            format: date-time
            type: string
        - name: updatedAtGe
          required: false
          in: query
          description: >-
            This will return items where the updatedAt is greater than or equal
            to the specified value.
          schema:
            format: date-time
            type: string
        - name: updatedAtLe
          required: false
          in: query
          description: >-
            This will return items where the updatedAt is less than or equal to
            the specified value.
          schema:
            format: date-time
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsPaginatedResponse'
      deprecated: true
      security:
        - bearer: []
components:
  schemas:
    LogsPaginatedResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/Log'
        metadata:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - results
        - metadata
    Log:
      type: object
      properties:
        time:
          type: string
          description: This is the timestamp at which the log was written.
        orgId:
          type: string
          description: This is the unique identifier for the org that this log belongs to.
        type:
          type: string
          description: This is the type of the log.
          enum:
            - API
            - Webhook
            - Call
            - Provider
        webhookType:
          type: string
          description: This is the type of the webhook, given the log is from a webhook.
        resource:
          type: string
          description: This is the specific resource, relevant only to API logs.
          enum:
            - org
            - assistant
            - analytics
            - credential
            - phone-number
            - block
            - voice-library
            - provider
            - tool
            - token
            - template
            - squad
            - call
            - file
            - metric
            - log
        requestDurationSeconds:
          type: number
          description: '''This is how long the request took.'
          minimum: 0
        requestStartedAt:
          type: string
          description: This is the timestamp at which the request began.
        requestFinishedAt:
          type: string
          description: This is the timestamp at which the request finished.
        requestBody:
          type: object
          description: This is the body of the request.
        requestHttpMethod:
          type: string
          description: This is the request method.
          enum:
            - POST
            - GET
            - PUT
            - PATCH
            - DELETE
        requestUrl:
          type: string
          description: This is the request URL.
        requestPath:
          type: string
          description: This is the request path.
        requestQuery:
          type: string
          description: This is the request query.
        responseHttpCode:
          type: number
          description: This the HTTP status code of the response.
        requestIpAddress:
          type: string
          description: This is the request IP address.
        requestOrigin:
          type: string
          description: This is the origin of the request
        responseBody:
          type: object
          description: This is the body of the response.
        requestHeaders:
          type: object
          description: These are the headers of the request.
        error:
          description: This is the error, if one occurred.
          allOf:
            - $ref: '#/components/schemas/Error'
        assistantId:
          type: string
          description: This is the ID of the assistant.
        phoneNumberId:
          type: string
          description: This is the ID of the phone number.
        customerId:
          type: string
          description: This is the ID of the customer.
        squadId:
          type: string
          description: This is the ID of the squad.
        callId:
          type: string
          description: This is the ID of the call.
      required:
        - time
        - orgId
        - type
    PaginationMeta:
      type: object
      properties:
        itemsPerPage:
          type: number
        totalItems:
          type: number
        currentPage:
          type: number
      required:
        - itemsPerPage
        - totalItems
        - currentPage
    Error:
      type: object
      properties:
        message:
          type: string
      required:
        - message
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: Bearer
      type: http
      description: Retrieve your API Key from [Dashboard](dashboard.cozmox.ai).

````