> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Search and retrieve tool execution logs

> Search and retrieve tool execution logs with filtering, pagination, and time range support.



## OpenAPI

````yaml api-reference/openapi.json POST /api/v3.1/logs/tool_execution
openapi: 3.1.0
info:
  version: 3.1.0
  title: Composio Platform API v3.1
  description: >-
    Composio v3.1 API — all endpoints available under /api/v3.1/. Tool endpoints
    default to the latest tool version.
  contact:
    name: Composio Support
    url: https://composio.dev/support
    email: support@composio.dev
  license:
    name: Proprietary
    url: https://composio.dev/terms
servers:
  - url: https://backend.composio.dev
    description: Composio production API
security:
  - ApiKeyAuth: []
tags:
  - name: Authentication
    description: Authentication related endpoints
    x-group: Authentication
  - name: Auth Configs
    description: Authentication configuration management
    x-group: Auth Configs
  - name: Connected Accounts
    description: Connected account management
    x-group: Connected Accounts
  - name: Logs
    description: Logging and monitoring
    x-group: Logs
  - name: OpenAPI
    description: OpenAPI specification management
    x-group: OpenAPI
  - name: Organization
    description: Organization management
    x-group: Organization
  - name: API Keys
    description: API key management
    x-group: API Keys
  - name: Webhooks
    description: Webhook configuration
    x-group: Webhooks
  - name: Webhook Endpoints
    description: >-
      Per-OAuth-app webhook ingress endpoints. Inbound URLs the provider posts
      to, plus signing secret storage and verification.
    x-group: Webhook Endpoints
  - name: Webhook Subscriptions
    description: >-
      Webhook delivery subscriptions. Outbound URLs Composio posts trigger
      events to, plus signing secret rotation and event-type filters.
    x-group: Webhook Subscriptions
  - name: Team
    description: Team member management
    x-group: Team
  - name: Consumer Skills
    description: Organization-authored Skill management
    x-group: Consumer Skills
  - name: Toolkits
    description: Toolkit and tool management
    x-group: Toolkits
  - name: Tools
    description: Tool execution endpoints
    x-group: Tools
  - name: Triggers
    description: Trigger management and execution
    x-group: Triggers
  - name: Payments
    description: Payment and subscription management
    x-group: Payments
  - name: Billing
    description: Dashboard billing state — usage, subscription, contract (cookie-auth only)
    x-group: Billing
  - name: Compliance
    description: Organization compliance agreements and acceptance state
    x-group: Compliance
  - name: Files
    description: File management
    x-group: Files
  - name: MCP
    description: MCP server management
    x-group: MCP
  - name: MCP Partner
    description: MCP partner management
    x-group: MCP Partner
  - name: Stripe Projects
    description: Stripe Projects provisioning
    x-group: Stripe Projects
  - name: Tool Router
    description: (Labs) Tool router endpoints
    x-group: Sessions (Prev Tool Router)
  - name: Playground
    description: Dashboard playground chat
    x-group: Playground
  - name: Arena
    description: Arena conversations, messages and terms
    x-group: Arena
  - name: Projects
    description: Projects API endpoints.
    x-group: Projects
  - name: Organization Management
    description: Organization Management API endpoints.
    x-group: Organization Management
  - name: Webhook Events
    description: Events delivered by Composio to your registered webhook endpoints
    x-group: Webhook Events
paths:
  /api/v3.1/logs/tool_execution:
    post:
      tags:
        - Logs
      summary: Search and retrieve tool execution logs
      description: >-
        Search and retrieve tool execution logs with filtering, pagination, and
        time range support.
      operationId: postLogsToolExecution
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                limit:
                  type: number
                  minimum: 1
                  maximum: 100
                  default: 20
                cursor:
                  type:
                    - string
                    - 'null'
                  description: >-
                    The `next_cursor` from the previous page. Omit it for the
                    first page.
                filters:
                  type: array
                  items:
                    type: object
                    properties:
                      field:
                        type: string
                        enum:
                          - tool_slug
                          - toolkit_slug
                          - connected_account_id
                          - auth_config_id
                          - status
                          - user_id
                          - session_id
                          - sandbox_id
                          - request_id
                          - log_id
                      operator:
                        type: string
                        enum:
                          - '=='
                          - '!='
                          - contains
                          - not_contains
                      value:
                        type: string
                    required:
                      - field
                      - operator
                      - value
                  default: []
                time_range:
                  type: object
                  properties:
                    from:
                      type: number
                      description: Start time in epoch milliseconds
                    to:
                      type: number
                      description: End time in epoch milliseconds
                  required:
                    - from
                    - to
      responses:
        '200':
          description: Successfully retrieved tool logs
          content:
            application/json:
              schema:
                type: object
                properties:
                  logs:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        timestamp:
                          type: string
                          format: date-time
                          description: ISO 8601 timestamp
                        type:
                          type: string
                          description: >-
                            Log event type, e.g. tool.execution,
                            trigger.message, connected_account.activated
                        status:
                          type: string
                          enum:
                            - success
                            - failed
                        level:
                          type: string
                          enum:
                            - info
                            - error
                            - warn
                        message:
                          type: string
                        metadata:
                          type: object
                          properties:
                            credential_source:
                              type: string
                              enum:
                                - connected_account
                                - instant_account
                                - custom_auth
                                - no_auth
                              description: >-
                                Credential used for this execution.
                                instant_account means a Composio Instant
                                account. Omitted when no credential source was
                                recorded.
                            instant_charge:
                              type: string
                              description: >-
                                Instant charge in USD for this tool, as an exact
                                decimal string. Omitted when no charge was
                                recorded; zero is returned as the string 0.
                          additionalProperties: {}
                        metrics:
                          type: object
                          additionalProperties: {}
                        parent:
                          type:
                            - object
                            - 'null'
                          properties:
                            log_id:
                              type: string
                            tool_slug:
                              type: string
                          required:
                            - log_id
                            - tool_slug
                      required:
                        - id
                        - timestamp
                        - type
                        - status
                        - level
                        - metadata
                        - metrics
                        - parent
                  next_cursor:
                    type:
                      - string
                      - 'null'
                    description: >-
                      Opaque cursor for the next page; pass it back as `cursor`.
                      Null when the page is empty.
                required:
                  - logs
                  - next_cursor
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: number
            slug:
              type: string
            status:
              type: number
            request_id:
              type: string
            suggested_fix:
              type: string
            errors:
              type: array
              items:
                type: string
          required:
            - message
            - code
            - slug
            - status
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Composio project API key. Create or copy it from the Composio
        dashboard.
      x-default: your-project-api-key

````