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

# Get run logs

> Get detailed logs for a specific scheduler run



## OpenAPI

````yaml https://raw.githubusercontent.com/lightdash/lightdash/refs/heads/main/packages/backend/src/generated/swagger.json get /api/v1/schedulers/runs/{runId}/logs
openapi: 3.0.0
info:
  title: Lightdash API
  version: 0.3233.0
  description: >
    Open API documentation for all public Lightdash API endpoints. #
    Authentication Before you get started, you might need to create a Personal
    Access Token to authenticate via the API. You can create a token by
    following this guide: https://docs.lightdash.com/references/personal_tokens
  license:
    name: MIT
  contact:
    name: Lightdash Support
    email: support@lightdash.com
    url: https://docs.lightdash.com/help-and-contact/contact/contact_info/
servers:
  - url: /
security: []
tags:
  - name: My Account
    description: These routes allow users to manage their own user account.
  - name: Organizations
    description: >-
      Each user is a member of a single organization. These routes allow users
      to manage their organization. Most actions are only available to admin
      users.
  - name: Projects
    description: >-
      Projects belong to a single organization. These routes allow users to
      manage their projects, browse content, and execute queries. Users inside
      an organization might have access to a project from an organization-level
      role or they might be granted access to a project directly.
  - name: Spaces
    description: >-
      Spaces allow you to organize charts and dashboards within a project. They
      also allow granular access to content by allowing you to create private
      spaces, which are only accessible to the creator and admins.
  - name: Roles & Permissions
    description: >-
      These routes allow users to manage roles and permissions for their
      organization.
    externalDocs:
      url: https://docs.lightdash.com/references/roles
  - name: Query
    description: >-
      These routes allow users to execute and manage queries against their data
      warehouse. This includes metric queries, SQL queries, and retrieving query
      results.
paths:
  /api/v1/schedulers/runs/{runId}/logs:
    get:
      tags:
        - Schedulers
      summary: Get run logs
      description: Get detailed logs for a specific scheduler run
      operationId: getRunLogs
      parameters:
        - description: The ID of the run (parent job ID)
          in: path
          name: runId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiSchedulerRunLogsResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorPayload'
      security: []
components:
  schemas:
    ApiSchedulerRunLogsResponse:
      $ref: '#/components/schemas/ApiSuccess_SchedulerRunLogsResponse_'
    ApiErrorPayload:
      properties:
        error:
          properties:
            data:
              $ref: '#/components/schemas/AnyType'
              description: Optional data containing details of the error
            message:
              type: string
              description: A friendly message summarising the error
            name:
              type: string
              description: Unique name for the type of error
            statusCode:
              type: number
              format: integer
              description: HTTP status code
          required:
            - name
            - statusCode
          type: object
        status:
          type: string
          enum:
            - error
          nullable: false
      required:
        - error
        - status
      type: object
      description: |-
        The Error object is returned from the api any time there is an error.
        The message contains
    ApiSuccess_SchedulerRunLogsResponse_:
      properties:
        results:
          $ref: '#/components/schemas/SchedulerRunLogsResponse'
        status:
          type: string
          enum:
            - ok
          nullable: false
      required:
        - results
        - status
      type: object
    AnyType:
      description: |-
        This AnyType is an alias for any
        The goal is to make it easier to identify any type in the codebase
        without having to eslint-disable all the time
        These are only used on legacy `any` types, don't use it for new types.
        This is added on a separate file to avoid circular dependencies.
    SchedulerRunLogsResponse:
      properties:
        createdByUserName:
          type: string
        createdByUserUuid:
          type: string
        resourceName:
          type: string
        resourceUuid:
          type: string
        resourceType:
          $ref: '#/components/schemas/SchedulerResourceType'
        logs:
          items:
            $ref: '#/components/schemas/SchedulerRunLog'
          type: array
        scheduledTime:
          type: string
          format: date-time
        schedulerName:
          type: string
        schedulerUuid:
          type: string
        runId:
          type: string
      required:
        - createdByUserName
        - createdByUserUuid
        - resourceName
        - resourceUuid
        - resourceType
        - logs
        - scheduledTime
        - schedulerName
        - schedulerUuid
        - runId
      type: object
    SchedulerResourceType:
      enum:
        - chart
        - dashboard
        - sqlChart
        - app
      type: string
    SchedulerRunLog:
      allOf:
        - $ref: '#/components/schemas/BaseSchedulerLog'
        - properties:
            isParent:
              type: boolean
            details:
              allOf:
                - $ref: '#/components/schemas/SchedulerDetails'
              nullable: true
            targetType:
              allOf:
                - $ref: '#/components/schemas/SchedulerTargetType'
              nullable: true
            target:
              type: string
              nullable: true
            jobGroup:
              type: string
          required:
            - isParent
            - details
            - targetType
            - target
            - jobGroup
          type: object
    BaseSchedulerLog:
      properties:
        createdAt:
          type: string
          format: date-time
        scheduledTime:
          type: string
          format: date-time
        status:
          $ref: '#/components/schemas/SchedulerJobStatus'
        task:
          $ref: '#/components/schemas/SchedulerTaskName'
        jobId:
          type: string
      required:
        - createdAt
        - scheduledTime
        - status
        - task
        - jobId
      type: object
    SchedulerDetails:
      properties:
        thresholdStatus:
          $ref: '#/components/schemas/ThresholdStatus'
          description: >-
            Set when a threshold-alert scheduler completed without sending a
            notification because the threshold was not met.
        partialFailures:
          items:
            $ref: '#/components/schemas/PartialFailure'
          type: array
          description: >-
            Partial failures that occurred during the scheduled delivery (e.g.,
            some charts failed in a dashboard export)
        createdByUserUuid:
          type: string
        organizationUuid:
          type: string
        projectUuid:
          type: string
      additionalProperties:
        $ref: '#/components/schemas/AnyType'
      type: object
    SchedulerTargetType:
      type: string
      enum:
        - email
        - slack
        - gsheets
        - msteams
        - googlechat
    SchedulerJobStatus:
      enum:
        - scheduled
        - started
        - completed
        - error
      type: string
    SchedulerTaskName:
      type: string
      enum:
        - slackAiPrompt
        - aiAgentEvalResult
        - aiAgentReviewClassifier
        - aiAgentReviewWriteback
        - aiAgentReviewRemediationPreview
        - aiAgentReviewRemediationCompile
        - aiAgentReviewRemediationRun
        - sendReviewNotification
        - embedArtifactVersion
        - generateArtifactQuestion
        - appGeneratePipeline
        - sweepStaleAppLocks
        - handleScheduledDelivery
        - sendSlackNotification
        - sendEmailNotification
        - sendMsTeamsNotification
        - sendGoogleChatNotification
        - sendSlackBatchNotification
        - sendEmailBatchNotification
        - sendMsTeamsBatchNotification
        - sendGoogleChatBatchNotification
        - uploadGsheets
        - uploadGsheetFromQuery
        - validateProject
        - compileProject
        - createProjectWithCompile
        - testAndCompileProject
        - sqlRunner
        - sqlRunnerPivotQuery
        - replaceCustomFields
        - indexCatalog
        - generateDailyJobs
        - exportCsvDashboard
        - exportContent
        - renameResources
        - materializePreAggregate
        - cleanQueryHistory
        - downloadAsyncQueryResults
        - syncSlackChannels
        - generateSlackChannelSyncJobs
        - checkForStuckJobs
        - cleanDeploySessions
        - managedAgentHeartbeat
        - cleanExpiredPreviews
        - ingestProjectContext
    ThresholdStatus:
      description: >-
        Outcome of evaluating a threshold-alert scheduler against the latest
        query results.

        Emitted on `SchedulerDetails.thresholdStatus` and on the
        `scheduler_job.completed`

        analytics event so downstream consumers (UI toasts, dashboards) can
        branch reliably.
      enum:
        - met
        - not_met
      type: string
    PartialFailure:
      anyOf:
        - $ref: '#/components/schemas/DashboardChartPartialFailure'
        - $ref: '#/components/schemas/DashboardSqlChartPartialFailure'
        - $ref: '#/components/schemas/MissingTargetsPartialFailure'
    DashboardChartPartialFailure:
      properties:
        error:
          type: string
        tileUuid:
          type: string
        chartName:
          type: string
        chartUuid:
          type: string
        type:
          $ref: '#/components/schemas/PartialFailureType.DASHBOARD_CHART'
      required:
        - error
        - tileUuid
        - chartName
        - chartUuid
        - type
      type: object
    DashboardSqlChartPartialFailure:
      properties:
        error:
          type: string
        tileUuid:
          type: string
        chartName:
          type: string
        savedSqlUuid:
          type: string
        type:
          $ref: '#/components/schemas/PartialFailureType.DASHBOARD_SQL_CHART'
      required:
        - error
        - tileUuid
        - chartName
        - savedSqlUuid
        - type
      type: object
    MissingTargetsPartialFailure:
      properties:
        type:
          $ref: '#/components/schemas/PartialFailureType.MISSING_TARGETS'
      required:
        - type
      type: object
    PartialFailureType.DASHBOARD_CHART:
      enum:
        - dashboard_chart
      type: string
    PartialFailureType.DASHBOARD_SQL_CHART:
      enum:
        - dashboard_sql_chart
      type: string
    PartialFailureType.MISSING_TARGETS:
      enum:
        - missing_targets
      type: string

````