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

# Stream events from a DAG-failure diagnosis run

> Returns a Server-Sent Events stream of diagnosis events. Supports reconnection via the lastEventId query parameter.



## OpenAPI

````yaml /astro/api/v-1-labs/openapi.yaml get /organizations/{organizationId}/observability/deployments/{deploymentId}/dag-failure-diagnosis/runs/{diagnosisRunId}/events
openapi: 3.0.3
info:
  contact: {}
  description: Astro Labs API - Experimental endpoints for preview features
  title: Astro Labs API
  version: v1
servers:
  - url: https://api.astronomer.io/labs/v1
security:
  - JWT: []
tags:
  - description: >-
      Canned-data placeholder used to exercise the labs epoch versioning
      surface. Real labs endpoints register their own tags.
    name: Example
paths:
  /organizations/{organizationId}/observability/deployments/{deploymentId}/dag-failure-diagnosis/runs/{diagnosisRunId}/events:
    get:
      tags:
        - Observability
      summary: Stream events from a DAG-failure diagnosis run
      description: >-
        Returns a Server-Sent Events stream of diagnosis events. Supports
        reconnection via the lastEventId query parameter.
      operationId: LabsGetDagFailureDiagnosisEvents
      parameters:
        - description: The ID of the Organization to which the Deployment belongs.
          in: path
          name: organizationId
          required: true
          schema:
            type: string
        - description: The Deployment's ID.
          in: path
          name: deploymentId
          required: true
          schema:
            type: string
        - description: The diagnosis run ID.
          in: path
          name: diagnosisRunId
          required: true
          schema:
            type: string
        - description: The last event ID received, used for reconnection.
          in: query
          name: lastEventId
          schema:
            type: string
      responses:
        '200':
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/RcaSessionDiagnosis'
          description: OK
        '401':
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized
        '404':
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/Error'
          description: Not Found
        '500':
          content:
            text/event-stream:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error
      security:
        - JWT: []
components:
  schemas:
    RcaSessionDiagnosis:
      properties:
        affected_dags:
          description: Affected DAGs & child findings
          items:
            type: string
          type: array
        amplifier_description:
          type: string
        blast_radius:
          $ref: '#/components/schemas/RcaBlastRadius'
        cascade_chain:
          description: Cascade topology
          items:
            $ref: '#/components/schemas/RcaCascadeLink'
          type: array
        cascade_depth:
          type: integer
        change_point_date:
          type: string
        change_signals:
          items:
            $ref: '#/components/schemas/RcaChangeSignal'
          type: array
        child_dag_findings:
          items:
            $ref: '#/components/schemas/RcaChildDagFinding'
          type: array
        cofailure_pairs:
          description: Cofailure analysis
          items:
            $ref: '#/components/schemas/RcaCofailurePair'
          type: array
        confidence:
          type: number
        confidence_justification:
          type: string
        contributing_factors:
          items:
            type: string
          type: array
        coverage_quality:
          description: Coverage quality
          type: string
        dag_level_checks:
          description: Diagnostic checks
          items:
            $ref: '#/components/schemas/RcaCheck'
          type: array
        duration_percentiles:
          $ref: '#/components/schemas/RcaDurationPercentiles'
        effective_availability:
          description: Availability
          type: number
        evidence:
          description: Evidence
          items:
            type: string
          type: array
        evidence_gaps:
          items:
            $ref: '#/components/schemas/RcaEvidenceGap'
          type: array
        evidence_status:
          enum:
            - confirmed
            - hypothesis
            - insufficient_evidence
          type: string
        exception_class:
          type: string
        exception_message:
          type: string
        failure_onset_date:
          description: Temporal context
          type: string
        fleet_health_score:
          type: number
        from_dag_run_id:
          description: >-
            Provenance fields layered on by core / polaris-agent after the LLM
            emits:
              - FromDagRunId: original dag_run_id when this diagnosis was replayed
                from the polaris-agent dedup cache (absent on fresh diagnoses).
              - SessionId: durable id of the RCA session row this diagnosis was
                emitted from.
          type: string
        health_gap:
          type: string
        is_cascade_amplifier:
          type: boolean
        last_success_date:
          type: string
        log_classification:
          type: string
        log_signals:
          items:
            type: string
          type: array
        log_snippet:
          description: Log analysis
          type: string
        match_count:
          type: integer
        prevention_measures:
          items:
            $ref: '#/components/schemas/RcaPreventionMeasure'
          type: array
        priority:
          type: string
        remediation:
          type: string
        rendered_conn_ids:
          description: Connection context
          items:
            type: string
          type: array
        reported_success_rate:
          type: number
        root_cause:
          description: Root cause
          type: string
        root_cause_task:
          type: string
        root_cause_type:
          type: string
        seasonality_signal:
          type: string
        session_id:
          type: string
        severity:
          description: Severity & confidence
          type: string
        suggested_fix:
          description: Remediation & recommendations
          type: string
        summary:
          type: string
        symptoms:
          items:
            type: string
          type: array
        tasks:
          items:
            $ref: '#/components/schemas/RcaTaskDiagnosis'
          type: array
        timeline_events:
          description: Timeline & change signals
          items:
            $ref: '#/components/schemas/RcaTimelineEvent'
          type: array
        title:
          description: Core identification
          type: string
        transience:
          type: string
        trend_direction:
          type: string
        vendor_dashboard_url:
          type: string
        vendor_destination:
          type: string
        vendor_name:
          description: Vendor context
          type: string
        vendor_remediation:
          type: string
      required:
        - summary
        - title
      type: object
    Error:
      properties:
        fieldErrors:
          description: >-
            FieldErrors carries one entry per failed request-validation
            constraint.

            Only present on 400 responses caused by request binding/validation.
          items:
            $ref: '#/components/schemas/FieldValidationError'
          type: array
        message:
          type: string
        requestId:
          type: string
        statusCode:
          maximum: 600
          minimum: 400
          type: integer
      required:
        - message
        - requestId
        - statusCode
      type: object
    RcaBlastRadius:
      properties:
        affected_dags:
          items:
            type: string
          type: array
        affected_runs:
          type: integer
        affected_tasks:
          type: integer
        downstream_consumers:
          items:
            type: string
          type: array
        scope:
          type: string
      type: object
    RcaCascadeLink:
      properties:
        description:
          type: string
        failure_type:
          type: string
        task_id:
          type: string
      required:
        - task_id
      type: object
    RcaChangeSignal:
      properties:
        correlation_to_failure_onset:
          type: string
        description:
          type: string
        signal_type:
          type: string
        timestamp:
          type: string
      type: object
    RcaChildDagFinding:
      properties:
        dag_id:
          type: string
        finding:
          type: string
      required:
        - dag_id
      type: object
    RcaCofailurePair:
      properties:
        cofailure_window_minutes:
          type: integer
        correlation_score:
          type: number
        dag_a:
          type: string
        dag_b:
          type: string
        shared_resource:
          type: string
        shared_resource_type:
          type: string
      required:
        - dag_a
        - dag_b
      type: object
    RcaCheck:
      properties:
        check:
          type: string
        detail:
          type: string
        passed:
          type: boolean
      required:
        - check
      type: object
    RcaDurationPercentiles:
      properties:
        p50:
          type: number
        p90:
          type: number
        p95:
          type: number
        p99:
          type: number
      type: object
    RcaEvidenceGap:
      properties:
        detail:
          type: string
        field_name:
          type: string
        why_missing:
          enum:
            - attempted_no_data
            - not_attempted
            - not_applicable
          type: string
      required:
        - field_name
      type: object
    RcaPreventionMeasure:
      properties:
        category:
          type: string
        priority:
          type: string
        recommendation:
          type: string
      type: object
    RcaTaskDiagnosis:
      properties:
        checks:
          items:
            $ref: '#/components/schemas/RcaCheck'
          type: array
        first_attempt_error:
          type: string
        retry_attempts:
          items:
            $ref: '#/components/schemas/RcaRetryAttempt'
          type: array
        task_id:
          type: string
        task_ran:
          type: boolean
      required:
        - task_id
      type: object
    RcaTimelineEvent:
      properties:
        event:
          type: string
        event_type:
          type: string
        timestamp:
          type: string
      type: object
    FieldValidationError:
      properties:
        code:
          type: string
        field:
          type: string
        message:
          type: string
      required:
        - code
        - field
        - message
      type: object
    RcaRetryAttempt:
      properties:
        duration_sec:
          type: number
        error:
          type: string
        timestamp:
          type: string
        try_number:
          type: integer
        worker:
          type: string
      type: object
  securitySchemes:
    JWT:
      scheme: bearer
      type: http

````