Apache Livy · Capability

Apache Livy REST API — Batches

Apache Livy REST API — Batches. 6 operations. Lead operation: Apache livy Apache Livy List Batches. Self-contained Naftiko capability covering one Apache Livy business surface.

Run with Naftiko Apache LivyBatches

What You Can Do

GET
Listbatches — Apache livy Apache Livy List Batches
/v1/batches
POST
Createbatch — Apache livy Apache Livy Create Batch
/v1/batches
GET
Getbatch — Apache livy Apache Livy Get Batch
/v1/batches/{batchid}
DELETE
Deletebatch — Apache livy Apache Livy Delete Batch
/v1/batches/{batchid}
GET
Getbatchlog — Apache livy Apache Livy Get Batch Log
/v1/batches/{batchid}/log
GET
Getbatchstate — Apache livy Apache Livy Get Batch State
/v1/batches/{batchid}/state

MCP Tools

apache-livy-apache-livy-list

Apache livy Apache Livy List Batches

read-only idempotent
apache-livy-apache-livy-create

Apache livy Apache Livy Create Batch

apache-livy-apache-livy-get

Apache livy Apache Livy Get Batch

read-only idempotent
apache-livy-apache-livy-delete

Apache livy Apache Livy Delete Batch

idempotent
apache-livy-apache-livy-get-2

Apache livy Apache Livy Get Batch Log

read-only idempotent
apache-livy-apache-livy-get-3

Apache livy Apache Livy Get Batch State

read-only idempotent

Capability Spec

rest-batches.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Apache Livy REST API — Batches
  description: 'Apache Livy REST API — Batches. 6 operations. Lead operation: Apache livy Apache Livy List Batches. Self-contained
    Naftiko capability covering one Apache Livy business surface.'
  tags:
  - Apache Livy
  - Batches
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    APACHE_LIVY_API_KEY: APACHE_LIVY_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-batches
    baseUri: http://localhost:8998
    description: Apache Livy REST API — Batches business capability. Self-contained, no shared references.
    resources:
    - name: batches
      path: /batches
      operations:
      - name: listbatches
        method: GET
        description: Apache livy Apache Livy List Batches
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: from
          in: query
          type: integer
        - name: size
          in: query
          type: integer
      - name: createbatch
        method: POST
        description: Apache livy Apache Livy Create Batch
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: batches-batchId
      path: /batches/{batchId}
      operations:
      - name: getbatch
        method: GET
        description: Apache livy Apache Livy Get Batch
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: batchId
          in: path
          type: integer
          required: true
      - name: deletebatch
        method: DELETE
        description: Apache livy Apache Livy Delete Batch
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: batchId
          in: path
          type: integer
          required: true
    - name: batches-batchId-log
      path: /batches/{batchId}/log
      operations:
      - name: getbatchlog
        method: GET
        description: Apache livy Apache Livy Get Batch Log
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: batchId
          in: path
          type: integer
          required: true
        - name: from
          in: query
          type: integer
        - name: size
          in: query
          type: integer
    - name: batches-batchId-state
      path: /batches/{batchId}/state
      operations:
      - name: getbatchstate
        method: GET
        description: Apache livy Apache Livy Get Batch State
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: batchId
          in: path
          type: integer
          required: true
  exposes:
  - type: rest
    namespace: rest-batches-rest
    port: 8080
    description: REST adapter for Apache Livy REST API — Batches. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/batches
      name: batches
      description: REST surface for batches.
      operations:
      - method: GET
        name: listbatches
        description: Apache livy Apache Livy List Batches
        call: rest-batches.listbatches
        with:
          from: rest.from
          size: rest.size
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createbatch
        description: Apache livy Apache Livy Create Batch
        call: rest-batches.createbatch
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/batches/{batchid}
      name: batches-batchid
      description: REST surface for batches-batchId.
      operations:
      - method: GET
        name: getbatch
        description: Apache livy Apache Livy Get Batch
        call: rest-batches.getbatch
        with:
          batchId: rest.batchId
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletebatch
        description: Apache livy Apache Livy Delete Batch
        call: rest-batches.deletebatch
        with:
          batchId: rest.batchId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/batches/{batchid}/log
      name: batches-batchid-log
      description: REST surface for batches-batchId-log.
      operations:
      - method: GET
        name: getbatchlog
        description: Apache livy Apache Livy Get Batch Log
        call: rest-batches.getbatchlog
        with:
          batchId: rest.batchId
          from: rest.from
          size: rest.size
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/batches/{batchid}/state
      name: batches-batchid-state
      description: REST surface for batches-batchId-state.
      operations:
      - method: GET
        name: getbatchstate
        description: Apache livy Apache Livy Get Batch State
        call: rest-batches.getbatchstate
        with:
          batchId: rest.batchId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-batches-mcp
    port: 9090
    transport: http
    description: MCP adapter for Apache Livy REST API — Batches. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: apache-livy-apache-livy-list
      description: Apache livy Apache Livy List Batches
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-batches.listbatches
      with:
        from: tools.from
        size: tools.size
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-livy-apache-livy-create
      description: Apache livy Apache Livy Create Batch
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-batches.createbatch
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-livy-apache-livy-get
      description: Apache livy Apache Livy Get Batch
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-batches.getbatch
      with:
        batchId: tools.batchId
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-livy-apache-livy-delete
      description: Apache livy Apache Livy Delete Batch
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-batches.deletebatch
      with:
        batchId: tools.batchId
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-livy-apache-livy-get-2
      description: Apache livy Apache Livy Get Batch Log
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-batches.getbatchlog
      with:
        batchId: tools.batchId
        from: tools.from
        size: tools.size
      outputParameters:
      - type: object
        mapping: $.
    - name: apache-livy-apache-livy-get-3
      description: Apache livy Apache Livy Get Batch State
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-batches.getbatchstate
      with:
        batchId: tools.batchId
      outputParameters:
      - type: object
        mapping: $.