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

# Get Execution Logs

> Get the run history of one agent schedule.

Each retry attempt is recorded as its own entry, with an `attempt` number.


## OpenAPI

````yaml openapi/scheduler.yaml GET /schedules/{schedule_id}/logs
openapi: 3.0.3
info:
  title: Lyzr Scheduler and Webhooks API
  version: 1.1.0
  description: >-
    Scheduler service for running Lyzr agents on cron schedules, triggering
    agents from external systems through signed webhooks, and calling arbitrary
    HTTP endpoints on a cron schedule.
servers:
  - url: https://scheduler.studio.lyzr.ai
security:
  - ApiKeyAuth: []
tags:
  - name: Schedules
    description: Run an agent on a cron schedule.
  - name: Agent Webhooks
    description: Create and manage webhook URLs that trigger an agent.
  - name: Webhook Trigger
    description: Public endpoint external services call to trigger an agent.
  - name: HTTP Schedules
    description: Call any HTTP endpoint on a cron schedule.
paths:
  /schedules/{schedule_id}/logs:
    get:
      tags:
        - Schedules
      summary: Get execution logs
      description: Get the run history of one agent schedule.
      parameters:
        - $ref: '#/components/parameters/ScheduleId'
        - $ref: '#/components/parameters/Skip'
        - $ref: '#/components/parameters/LogLimit'
      responses:
        '200':
          description: Execution log entries for the schedule.
          content:
            application/json:
              schema:
                type: object
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    ScheduleId:
      name: schedule_id
      in: path
      required: true
      description: ID of the schedule.
      schema:
        type: string
        example: 66f1c2a9e4b0a1b2c3d4e5f6
    Skip:
      name: skip
      in: query
      required: false
      description: Number of records to skip.
      schema:
        type: integer
        minimum: 0
        default: 0
    LogLimit:
      name: limit
      in: query
      required: false
      description: Maximum number of log entries to return (1-100).
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
  responses:
    Forbidden:
      description: The `x-api-key` header is missing or the key is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: Missing API key
              value:
                detail: API key missing
            invalid:
              summary: Invalid API key
              value:
                detail: Invalid Permission
    NotFound:
      description: No resource with this ID exists for your API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ValidationError:
      description: The request failed validation. The body lists each invalid field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/HTTPValidationError'
  schemas:
    Error:
      type: object
      properties:
        detail:
          type: string
          example: Schedule not found
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            type: object
            properties:
              loc:
                type: array
                description: Path to the invalid field.
                items:
                  oneOf:
                    - type: string
                    - type: integer
              msg:
                type: string
                description: Human-readable error message.
              type:
                type: string
                description: Error type identifier.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Lyzr API key. Required on every endpoint except Trigger Webhook.

````