> ## 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.

# List Spark applications

> Completed Spark applications from their event logs, newest first.

Your own (the user Spark ran as), or everyone's for monitor admins with
`everyone=true`.



## OpenAPI

````yaml get /api/monitoring/spark/apps
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:
    get:
      tags:
        - Monitoring
      summary: List Spark applications
      description: |-
        Completed Spark applications from their event logs, newest first.

        Your own (the user Spark ran as), or everyone's for monitor admins with
        `everyone=true`.
      operationId: list_spark_apps_api_monitoring_spark_apps_get
      parameters:
        - name: everyone
          in: query
          required: false
          schema:
            type: boolean
            description: Everyone's (monitor admins only).
            default: false
            title: Everyone
          description: Everyone's (monitor admins only).
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                enum:
                  - succeeded
                  - failed
                  - incomplete
                  - unknown
                  - unreadable
              - type: 'null'
            title: Status
        - name: source
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                enum:
                  - airflow
                  - kyuubi
                  - notebook
                  - maintenance
                  - ingest
                  - other
              - type: 'null'
            title: Source
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 120
              - type: 'null'
            description: Name, id, user or DAG.
            title: Q
          description: Name, id, user or DAG.
        - name: since_hours
          in: query
          required: false
          schema:
            type: integer
            maximum: 2160
            minimum: 0
            description: 0 for no limit.
            default: 168
            title: Since Hours
          description: 0 for no limit.
        - name: flagged
          in: query
          required: false
          schema:
            type: boolean
            description: Only those with a signal worth a look.
            default: false
            title: Flagged
          description: Only those with a signal worth a look.
        - name: sort
          in: query
          required: false
          schema:
            enum:
              - started
              - duration
              - health
            type: string
            default: started
            title: Sort
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            title: Offset
            default: 0
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SparkAppList'
        '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:
    SparkAppList:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: False when indexing is switched off here.
        items:
          items:
            $ref: '#/components/schemas/SparkAppRow'
          type: array
          title: Items
        total:
          type: integer
          title: Total
          default: 0
        stats:
          $ref: '#/components/schemas/SparkAppStats'
        everyone:
          type: boolean
          title: Everyone
          description: Whether the list holds other people's applications.
        can_see_everyone:
          type: boolean
          title: Can See Everyone
          default: false
        last_indexed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Indexed At
      type: object
      required:
        - enabled
        - everyone
      title: SparkAppList
    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.
    SparkAppStats:
      properties:
        total:
          type: integer
          title: Total
          default: 0
        succeeded:
          type: integer
          title: Succeeded
          default: 0
        failed:
          type: integer
          title: Failed
          default: 0
        flagged:
          type: integer
          title: Flagged
          default: 0
        executor_hours:
          type: number
          title: Executor Hours
          default: 0
      type: object
      title: SparkAppStats
      description: Tiles over the same filter as the list (status filter aside).
    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
  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.