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

# Get a Spark application

> One application: stages, executors, jobs, SQL executions (without plans),
redacted settings, its signals and health score.



## OpenAPI

````yaml get /api/monitoring/spark/apps/{app}
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/monitoring/spark/apps/{app}:
    get:
      tags:
        - Monitoring
      summary: Get a Spark application
      description: >-
        One application: stages, executors, jobs, SQL executions (without
        plans),

        redacted settings, its signals and health score.
      operationId: get_spark_app_api_monitoring_spark_apps__app__get
      parameters:
        - name: app
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
            pattern: ^[A-Za-z0-9][A-Za-z0-9_.:-]*$
            description: The application id (or its log name, with the attempt).
            title: App
          description: The application id (or its log name, with the attempt).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SparkAppDetail'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    SparkAppDetail:
      properties:
        row:
          $ref: '#/components/schemas/SparkAppRow'
        available:
          type: boolean
          title: Available
          description: False when the log couldn't be read or parsed.
        app:
          additionalProperties: true
          type: object
          title: App
        source:
          additionalProperties: true
          type: object
          title: Source
        resources:
          additionalProperties: true
          type: object
          title: Resources
        totals:
          additionalProperties: true
          type: object
          title: Totals
        jobs:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Jobs
        stages:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Stages
        executors:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Executors
        timeline:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Timeline
        sql:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Sql
          description: SQL executions without plan text or nodes.
        plan_features:
          additionalProperties:
            type: integer
          type: object
          title: Plan Features
        config:
          additionalProperties:
            type: string
          type: object
          title: Config
          description: Redacted.
        hadoop_config:
          additionalProperties:
            type: string
          type: object
          title: Hadoop Config
        parse:
          additionalProperties: true
          type: object
          title: Parse
        signals:
          items:
            $ref: '#/components/schemas/SparkSignal'
          type: array
          title: Signals
        health:
          anyOf:
            - $ref: '#/components/schemas/SparkHealth'
            - type: 'null'
      type: object
      required:
        - row
        - available
      title: SparkAppDetail
      description: 'One application: everything but each SQL plan''s text and nodes.'
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SparkAppRow:
      properties:
        app_key:
          type: string
          title: App Key
          description: 'The log''s name: application id plus attempt.'
        app_id:
          type: string
          title: App Id
        attempt:
          anyOf:
            - type: string
            - type: 'null'
          title: Attempt
        name:
          type: string
          title: Name
        spark_user:
          type: string
          title: Spark User
        source_kind:
          anyOf:
            - type: string
              enum:
                - airflow
                - kyuubi
                - notebook
                - maintenance
                - ingest
                - other
            - type: string
          title: Source Kind
        source_ref:
          type: string
          title: Source Ref
          default: ''
        status:
          anyOf:
            - type: string
              enum:
                - succeeded
                - failed
                - incomplete
                - unknown
                - unreadable
            - type: string
          title: Status
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
        ended_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Ended At
        duration_ms:
          type: integer
          title: Duration Ms
        spark_version:
          type: string
          title: Spark Version
          default: ''
        executors:
          type: integer
          title: Executors
        tasks:
          type: integer
          title: Tasks
        failed_tasks:
          type: integer
          title: Failed Tasks
        input_bytes:
          type: integer
          title: Input Bytes
        shuffle_read_bytes:
          type: integer
          title: Shuffle Read Bytes
        disk_spill_bytes:
          type: integer
          title: Disk Spill Bytes
        executor_core_ms:
          type: integer
          title: Executor Core Ms
        health_score:
          anyOf:
            - type: integer
            - type: 'null'
          title: Health Score
        top_severity:
          anyOf:
            - type: string
              enum:
                - critical
                - high
                - medium
                - low
            - type: 'null'
          title: Top Severity
        signal_count:
          type: integer
          title: Signal Count
          default: 0
        badges:
          items:
            $ref: '#/components/schemas/SparkBadge'
          type: array
          title: Badges
        in_progress:
          type: boolean
          title: In Progress
          default: false
        truncated:
          type: boolean
          title: Truncated
          default: false
        parse_error:
          type: string
          title: Parse Error
          default: ''
        log_present:
          type: boolean
          title: Log Present
          default: true
        parsed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Parsed At
      type: object
      required:
        - app_key
        - app_id
        - name
        - spark_user
        - source_kind
        - status
        - duration_ms
        - executors
        - tasks
        - failed_tasks
        - input_bytes
        - shuffle_read_bytes
        - disk_spill_bytes
        - executor_core_ms
      title: SparkAppRow
      description: One application in the list.
    SparkSignal:
      properties:
        key:
          type: string
          title: Key
        category:
          type: string
          title: Category
        severity:
          type: string
          enum:
            - critical
            - high
            - medium
            - low
          title: Severity
        title:
          type: string
          title: Title
        detail:
          type: string
          title: Detail
        recommendation:
          type: string
          title: Recommendation
        evidence:
          additionalProperties: true
          type: object
          title: Evidence
        stage_ids:
          items:
            type: integer
          type: array
          title: Stage Ids
        config:
          additionalProperties:
            type: string
          type: object
          title: Config
          description: Suggested settings, as key → value.
      type: object
      required:
        - key
        - category
        - severity
        - title
        - detail
        - recommendation
      title: SparkSignal
    SparkHealth:
      properties:
        score:
          type: integer
          title: Score
        label:
          anyOf:
            - type: string
              enum:
                - healthy
                - needs_tuning
                - unhealthy
            - type: string
          title: Label
        categories:
          items:
            $ref: '#/components/schemas/SparkHealthCategory'
          type: array
          title: Categories
      type: object
      required:
        - score
        - label
      title: SparkHealth
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    SparkBadge:
      properties:
        key:
          type: string
          title: Key
        severity:
          type: string
          enum:
            - critical
            - high
            - medium
            - low
          title: Severity
        label:
          type: string
          title: Label
      type: object
      required:
        - key
        - severity
        - label
      title: SparkBadge
    SparkHealthCategory:
      properties:
        key:
          type: string
          title: Key
        label:
          type: string
          title: Label
        score:
          type: integer
          title: Score
      type: object
      required:
        - key
        - label
        - score
      title: SparkHealthCategory
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.