naftiko: 1.0.0-alpha2 info: label: Apache Spark Monitoring REST API description: 'Apache Spark Monitoring REST API. 26 operations. Lead operation: List applications. Self-contained Naftiko capability covering one Apache Spark business surface.' tags: - Apache Spark - Apache Spark Monitoring REST API created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: APACHE_SPARK_API_KEY: APACHE_SPARK_API_KEY capability: consumes: - type: http namespace: apache-spark baseUri: http://localhost:4040/api/v1 description: Apache Spark Monitoring REST API business capability. Self-contained, no shared references. resources: - name: applications path: /applications operations: - name: get method: GET description: List applications outputRawFormat: json outputParameters: - name: result type: object value: $. - name: applications-app-id-allexecutors path: /applications/{app-id}/allexecutors operations: - name: get method: GET description: List all executors (active and dead) outputRawFormat: json outputParameters: - name: result type: object value: $. - name: applications-app-id-environment path: /applications/{app-id}/environment operations: - name: get method: GET description: Application environment outputRawFormat: json outputParameters: - name: result type: object value: $. - name: applications-app-id-executors path: /applications/{app-id}/executors operations: - name: get method: GET description: List active executors outputRawFormat: json outputParameters: - name: result type: object value: $. - name: applications-app-id-executors-executor-id-threads path: /applications/{app-id}/executors/{executor-id}/threads operations: - name: get method: GET description: Executor thread dump outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: executor-id in: path type: string required: true - name: applications-app-id-jobs path: /applications/{app-id}/jobs operations: - name: get method: GET description: List jobs for an application outputRawFormat: json outputParameters: - name: result type: object value: $. - name: applications-app-id-jobs-job-id path: /applications/{app-id}/jobs/{job-id} operations: - name: get method: GET description: Get a job outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: job-id in: path type: string required: true - name: applications-app-id-sql path: /applications/{app-id}/sql operations: - name: get method: GET description: List SQL executions outputRawFormat: json outputParameters: - name: result type: object value: $. - name: applications-app-id-sql-execution-id path: /applications/{app-id}/sql/{execution-id} operations: - name: get method: GET description: Get SQL execution details outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: execution-id in: path type: string required: true - name: applications-app-id-stages path: /applications/{app-id}/stages operations: - name: get method: GET description: List stages outputRawFormat: json outputParameters: - name: result type: object value: $. - name: applications-app-id-stages-stage-id path: /applications/{app-id}/stages/{stage-id} operations: - name: get method: GET description: Get stage outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: stage-id in: path type: string required: true - name: applications-app-id-stages-stage-id-stage-attempt-id path: /applications/{app-id}/stages/{stage-id}/{stage-attempt-id} operations: - name: get method: GET description: Get stage attempt outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: stage-id in: path type: string required: true - name: stage-attempt-id in: path type: string required: true - name: applications-app-id-stages-stage-id-stage-attempt-id-taskList path: /applications/{app-id}/stages/{stage-id}/{stage-attempt-id}/taskList operations: - name: get method: GET description: Stage attempt task list outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: stage-id in: path type: string required: true - name: stage-attempt-id in: path type: string required: true - name: applications-app-id-stages-stage-id-stage-attempt-id-taskSummary path: /applications/{app-id}/stages/{stage-id}/{stage-attempt-id}/taskSummary operations: - name: get method: GET description: Stage attempt task summary outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: stage-id in: path type: string required: true - name: stage-attempt-id in: path type: string required: true - name: applications-app-id-storage-rdd path: /applications/{app-id}/storage/rdd operations: - name: get method: GET description: List persisted RDDs outputRawFormat: json outputParameters: - name: result type: object value: $. - name: applications-app-id-storage-rdd-rdd-id path: /applications/{app-id}/storage/rdd/{rdd-id} operations: - name: get method: GET description: Get RDD details outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: rdd-id in: path type: string required: true - name: applications-app-id-streaming-batches path: /applications/{app-id}/streaming/batches operations: - name: get method: GET description: Streaming batches outputRawFormat: json outputParameters: - name: result type: object value: $. - name: applications-app-id-streaming-batches-batch-id path: /applications/{app-id}/streaming/batches/{batch-id} operations: - name: get method: GET description: Streaming batch details outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: batch-id in: path type: string required: true - name: applications-app-id-streaming-batches-batch-id-operations path: /applications/{app-id}/streaming/batches/{batch-id}/operations operations: - name: get method: GET description: Streaming batch operations outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: batch-id in: path type: string required: true - name: applications-app-id-streaming-batches-batch-id-operations-outputOp-id path: /applications/{app-id}/streaming/batches/{batch-id}/operations/{outputOp-id} operations: - name: get method: GET description: Streaming output operation details outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: batch-id in: path type: string required: true - name: outputOp-id in: path type: string required: true - name: applications-app-id-streaming-receivers path: /applications/{app-id}/streaming/receivers operations: - name: get method: GET description: Streaming receivers outputRawFormat: json outputParameters: - name: result type: object value: $. - name: applications-app-id-streaming-receivers-stream-id path: /applications/{app-id}/streaming/receivers/{stream-id} operations: - name: get method: GET description: Streaming receiver details outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: stream-id in: path type: string required: true - name: applications-app-id-streaming-statistics path: /applications/{app-id}/streaming/statistics operations: - name: get method: GET description: Streaming statistics outputRawFormat: json outputParameters: - name: result type: object value: $. - name: applications-base-app-id-logs path: /applications/{base-app-id}/logs operations: - name: get method: GET description: Download event logs outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: base-app-id in: path type: string required: true - name: applications-base-app-id-attempt-id-logs path: /applications/{base-app-id}/{attempt-id}/logs operations: - name: get method: GET description: Download event logs for an attempt outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: base-app-id in: path type: string required: true - name: attempt-id in: path type: string required: true - name: version path: /version operations: - name: get method: GET description: Spark version outputRawFormat: json outputParameters: - name: result type: object value: $. exposes: - type: rest namespace: apache-spark-rest port: 8080 description: REST adapter for Apache Spark Monitoring REST API. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/applications name: applications description: REST surface for applications. operations: - method: GET name: get description: List applications call: apache-spark.get outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/allexecutors name: applications-app-id-allexecutors description: REST surface for applications-app-id-allexecutors. operations: - method: GET name: get description: List all executors (active and dead) call: apache-spark.get outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/environment name: applications-app-id-environment description: REST surface for applications-app-id-environment. operations: - method: GET name: get description: Application environment call: apache-spark.get outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/executors name: applications-app-id-executors description: REST surface for applications-app-id-executors. operations: - method: GET name: get description: List active executors call: apache-spark.get outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/executors/{executor-id}/threads name: applications-app-id-executors-executor-id-threads description: REST surface for applications-app-id-executors-executor-id-threads. operations: - method: GET name: get description: Executor thread dump call: apache-spark.get with: executor-id: rest.executor-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/jobs name: applications-app-id-jobs description: REST surface for applications-app-id-jobs. operations: - method: GET name: get description: List jobs for an application call: apache-spark.get outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/jobs/{job-id} name: applications-app-id-jobs-job-id description: REST surface for applications-app-id-jobs-job-id. operations: - method: GET name: get description: Get a job call: apache-spark.get with: job-id: rest.job-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/sql name: applications-app-id-sql description: REST surface for applications-app-id-sql. operations: - method: GET name: get description: List SQL executions call: apache-spark.get outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/sql/{execution-id} name: applications-app-id-sql-execution-id description: REST surface for applications-app-id-sql-execution-id. operations: - method: GET name: get description: Get SQL execution details call: apache-spark.get with: execution-id: rest.execution-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/stages name: applications-app-id-stages description: REST surface for applications-app-id-stages. operations: - method: GET name: get description: List stages call: apache-spark.get outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/stages/{stage-id} name: applications-app-id-stages-stage-id description: REST surface for applications-app-id-stages-stage-id. operations: - method: GET name: get description: Get stage call: apache-spark.get with: stage-id: rest.stage-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/stages/{stage-id}/{stage-attempt-id} name: applications-app-id-stages-stage-id-stage-attempt-id description: REST surface for applications-app-id-stages-stage-id-stage-attempt-id. operations: - method: GET name: get description: Get stage attempt call: apache-spark.get with: stage-id: rest.stage-id stage-attempt-id: rest.stage-attempt-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/stages/{stage-id}/{stage-attempt-id}/tasklist name: applications-app-id-stages-stage-id-stage-attempt-id-tasklist description: REST surface for applications-app-id-stages-stage-id-stage-attempt-id-taskList. operations: - method: GET name: get description: Stage attempt task list call: apache-spark.get with: stage-id: rest.stage-id stage-attempt-id: rest.stage-attempt-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/stages/{stage-id}/{stage-attempt-id}/tasksummary name: applications-app-id-stages-stage-id-stage-attempt-id-tasksummary description: REST surface for applications-app-id-stages-stage-id-stage-attempt-id-taskSummary. operations: - method: GET name: get description: Stage attempt task summary call: apache-spark.get with: stage-id: rest.stage-id stage-attempt-id: rest.stage-attempt-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/storage/rdd name: applications-app-id-storage-rdd description: REST surface for applications-app-id-storage-rdd. operations: - method: GET name: get description: List persisted RDDs call: apache-spark.get outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/storage/rdd/{rdd-id} name: applications-app-id-storage-rdd-rdd-id description: REST surface for applications-app-id-storage-rdd-rdd-id. operations: - method: GET name: get description: Get RDD details call: apache-spark.get with: rdd-id: rest.rdd-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/streaming/batches name: applications-app-id-streaming-batches description: REST surface for applications-app-id-streaming-batches. operations: - method: GET name: get description: Streaming batches call: apache-spark.get outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/streaming/batches/{batch-id} name: applications-app-id-streaming-batches-batch-id description: REST surface for applications-app-id-streaming-batches-batch-id. operations: - method: GET name: get description: Streaming batch details call: apache-spark.get with: batch-id: rest.batch-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/streaming/batches/{batch-id}/operations name: applications-app-id-streaming-batches-batch-id-operations description: REST surface for applications-app-id-streaming-batches-batch-id-operations. operations: - method: GET name: get description: Streaming batch operations call: apache-spark.get with: batch-id: rest.batch-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/streaming/batches/{batch-id}/operations/{outputop-id} name: applications-app-id-streaming-batches-batch-id-operations-outputop-id description: REST surface for applications-app-id-streaming-batches-batch-id-operations-outputOp-id. operations: - method: GET name: get description: Streaming output operation details call: apache-spark.get with: batch-id: rest.batch-id outputOp-id: rest.outputOp-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/streaming/receivers name: applications-app-id-streaming-receivers description: REST surface for applications-app-id-streaming-receivers. operations: - method: GET name: get description: Streaming receivers call: apache-spark.get outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/streaming/receivers/{stream-id} name: applications-app-id-streaming-receivers-stream-id description: REST surface for applications-app-id-streaming-receivers-stream-id. operations: - method: GET name: get description: Streaming receiver details call: apache-spark.get with: stream-id: rest.stream-id outputParameters: - type: object mapping: $. - path: /v1/applications/{app-id}/streaming/statistics name: applications-app-id-streaming-statistics description: REST surface for applications-app-id-streaming-statistics. operations: - method: GET name: get description: Streaming statistics call: apache-spark.get outputParameters: - type: object mapping: $. - path: /v1/applications/{base-app-id}/logs name: applications-base-app-id-logs description: REST surface for applications-base-app-id-logs. operations: - method: GET name: get description: Download event logs call: apache-spark.get with: base-app-id: rest.base-app-id outputParameters: - type: object mapping: $. - path: /v1/applications/{base-app-id}/{attempt-id}/logs name: applications-base-app-id-attempt-id-logs description: REST surface for applications-base-app-id-attempt-id-logs. operations: - method: GET name: get description: Download event logs for an attempt call: apache-spark.get with: base-app-id: rest.base-app-id attempt-id: rest.attempt-id outputParameters: - type: object mapping: $. - path: /v1/version name: version description: REST surface for version. operations: - method: GET name: get description: Spark version call: apache-spark.get outputParameters: - type: object mapping: $. - type: mcp namespace: apache-spark-mcp port: 9090 transport: http description: MCP adapter for Apache Spark Monitoring REST API. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-applications description: List applications hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $. - name: list-all-executors-active-and description: List all executors (active and dead) hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $. - name: application-environment description: Application environment hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $. - name: list-active-executors description: List active executors hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $. - name: executor-thread-dump description: Executor thread dump hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: executor-id: tools.executor-id outputParameters: - type: object mapping: $. - name: list-jobs-application description: List jobs for an application hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $. - name: get-job description: Get a job hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: job-id: tools.job-id outputParameters: - type: object mapping: $. - name: list-sql-executions description: List SQL executions hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $. - name: get-sql-execution-details description: Get SQL execution details hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: execution-id: tools.execution-id outputParameters: - type: object mapping: $. - name: list-stages description: List stages hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $. - name: get-stage description: Get stage hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: stage-id: tools.stage-id outputParameters: - type: object mapping: $. - name: get-stage-attempt description: Get stage attempt hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: stage-id: tools.stage-id stage-attempt-id: tools.stage-attempt-id outputParameters: - type: object mapping: $. - name: stage-attempt-task-list description: Stage attempt task list hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: stage-id: tools.stage-id stage-attempt-id: tools.stage-attempt-id outputParameters: - type: object mapping: $. - name: stage-attempt-task-summary description: Stage attempt task summary hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: stage-id: tools.stage-id stage-attempt-id: tools.stage-attempt-id outputParameters: - type: object mapping: $. - name: list-persisted-rdds description: List persisted RDDs hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $. - name: get-rdd-details description: Get RDD details hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: rdd-id: tools.rdd-id outputParameters: - type: object mapping: $. - name: streaming-batches description: Streaming batches hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $. - name: streaming-batch-details description: Streaming batch details hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: batch-id: tools.batch-id outputParameters: - type: object mapping: $. - name: streaming-batch-operations description: Streaming batch operations hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: batch-id: tools.batch-id outputParameters: - type: object mapping: $. - name: streaming-output-operation-details description: Streaming output operation details hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: batch-id: tools.batch-id outputOp-id: tools.outputOp-id outputParameters: - type: object mapping: $. - name: streaming-receivers description: Streaming receivers hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $. - name: streaming-receiver-details description: Streaming receiver details hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: stream-id: tools.stream-id outputParameters: - type: object mapping: $. - name: streaming-statistics description: Streaming statistics hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $. - name: download-event-logs description: Download event logs hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: base-app-id: tools.base-app-id outputParameters: - type: object mapping: $. - name: download-event-logs-attempt description: Download event logs for an attempt hints: readOnly: true destructive: false idempotent: true call: apache-spark.get with: base-app-id: tools.base-app-id attempt-id: tools.attempt-id outputParameters: - type: object mapping: $. - name: spark-version description: Spark version hints: readOnly: true destructive: false idempotent: true call: apache-spark.get outputParameters: - type: object mapping: $.