Microsoft Azure Spark Batch API

The SparkBatch API from Microsoft Azure, for sparkbatch.

GitHub OpenAPI

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /batches List Spark batch jobs in a Spark pool · Microsoft Azure Get Batches #
Ask an LLM
“Which Spark batch jobs are running in my Synapse Spark pool?”
“Can I page through Spark batch jobs with an offset and size?”
Tell an agent
List Spark batch jobs in the pool.
List {size} Spark batch jobs starting from {from}.
POST /batches Submit a new Spark batch job · Microsoft Azure Post Batches #
Ask an LLM
“How do I submit a Spark batch job to a Synapse Spark pool?”
“Can I set driver and executor memory when submitting a batch job?”
Tell an agent
Submit Spark batch job {name} running file {file}.
Run Spark batch {name} from {file} with main class {className}.
GET /batches/{batchId} Get a Spark batch job · Microsoft Azure Get Batches Batchid #
Ask an LLM
“How can I check the state of one Spark batch job?”
“Can I get detailed info such as logs for a single batch job?”
Tell an agent
Get Spark batch job {batchId}.
Show detailed status of Spark batch {batchId}.
DELETE /batches/{batchId} Cancel a running Spark batch job · Microsoft Azure Delete Batches Batchid #
Ask an LLM
“How do I stop a Spark batch job that's still running?”
“Can I cancel a Synapse Spark batch by its ID?”
Tell an agent destructive · confirm first
Cancel Spark batch job {batchId}.
Kill running Spark batch {batchId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure:microsoft-azure-sparkbatch-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-sparkbatch-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2019-11-01-preview
  title: Microsoft Azure SparkClient Spark Batch API
  x-ms-code-generation-settings:
    useDateTimeOffset: true
tags:
- name: SparkBatch
paths:
  /batches:
    get:
      tags:
      - SparkBatch
      description: List all spark batch jobs which are running under a particular spark pool.
      operationId: microsoftAzureSparkbatchGetsparkbatchjobs
      x-ms-examples:
        List all spark batch jobs:
          $ref: ./examples/SparkFrontend_SparkBatch_List.json
      parameters:
      - name: from
        in: query
        description: Optional param specifying which index the list should begin from.
        required: false
        schema:
          type: integer
          format: int32
      - name: size
        in: query
        description: "Optional param specifying the size of the returned list.\n            By default it is 20 and that is the maximum."
        required: false
        schema:
          type: integer
          format: int32
      - name: detailed
        in: query
        description: Optional query param specifying whether detailed response is returned beyond plain livy.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SparkBatchJobCollection'
      summary: Microsoft Azure Get Batches
    post:
      tags:
      - SparkBatch
      description: Create new spark batch job.
      operationId: microsoftAzureSparkbatchCreatesparkbatchjob
      x-ms-examples:
        Create new spark batch job.:
          $ref: ./examples/SparkFrontend_SparkBatch_Create.json
      parameters:
      - name: detailed
        in: query
        description: Optional query param specifying whether detailed response is returned beyond plain livy.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SparkBatchJob'
      summary: Microsoft Azure Post Batches
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SparkBatchJobOptions'
        description: Livy compatible batch job request payload.
        required: true
  /batches/{batchId}:
    get:
      tags:
      - SparkBatch
      description: Gets a single spark batch job.
      operationId: microsoftAzureSparkbatchGetsparkbatchjob
      x-ms-examples:
        Gets a single spark batch job.:
          $ref: ./examples/SparkFrontend_SparkBatch_Get.json
      parameters:
      - name: batchId
        in: path
        description: Identifier for the batch job.
        required: true
        schema:
          type: integer
          format: int32
      - name: detailed
        in: query
        description: Optional query param specifying whether detailed response is returned beyond plain livy.
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SparkBatchJob'
      summary: Microsoft Azure Get Batches Batchid
    delete:
      tags:
      - SparkBatch
      description: Cancels a running spark batch job.
      operationId: microsoftAzureSparkbatchCancelsparkbatchjob
      x-ms-examples:
        Cancels a running spark batch job.:
          $ref: ./examples/SparkFrontend_SparkBatch_Delete.json
      parameters:
      - name: batchId
        in: path
        description: Identifier for the batch job.
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Success
      summary: Microsoft Azure Delete Batches Batchid
components:
  schemas:
    SparkBatchJobCollection:
      type: object
      properties:
        from:
          format: int32
          type: integer
          description: The start index of fetched sessions.
        total:
          format: int32
          type: integer
          description: Number of sessions fetched.
        sessions:
          uniqueItems: false
          type: array
          description: Batch list
          items:
            $ref: '#/components/schemas/SparkBatchJob'
      required:
      - from
      - total
      description: Response for batch list operation.
    SparkBatchJobState:
      type: object
      properties:
        notStartedAt:
          format: date-time
          type:
          - string
          - 'null'
          description: the time that at which "not_started" livy state was first seen.
        startingAt:
          format: date-time
          type:
          - string
          - 'null'
          description: the time that at which "starting" livy state was first seen.
        runningAt:
          format: date-time
          type:
          - string
          - 'null'
          description: the time that at which "running" livy state was first seen.
        deadAt:
          format: date-time
          type:
          - string
          - 'null'
          description: time that at which "dead" livy state was first seen.
        successAt:
          format: date-time
          type:
          - string
          - 'null'
          description: the time that at which "success" livy state was first seen.
        killedAt:
          x-ms-client-name: terminatedAt
          format: date-time
          type:
          - string
          - 'null'
          description: the time that at which "killed" livy state was first seen.
        recoveringAt:
          format: date-time
          type:
          - string
          - 'null'
          description: the time that at which "recovering" livy state was first seen.
        currentState:
          type: string
          description: the Spark job state.
        jobCreationRequest:
          $ref: '#/components/schemas/SparkRequest'
    SparkBatchJobOptions:
      type: object
      properties:
        tags:
          type: object
          additionalProperties:
            type: string
        artifactId:
          type: string
        name:
          type: string
        file:
          type: string
        className:
          type: string
        args:
          x-ms-client-name: arguments
          uniqueItems: false
          type: array
          items:
            type: string
        jars:
          uniqueItems: false
          type: array
          items:
            type: string
        pyFiles:
          x-ms-client-name: pythonFiles
          uniqueItems: false
          type: array
          items:
            type: string
        files:
          uniqueItems: false
          type: array
          items:
            type: string
        archives:
          uniqueItems: false
          type: array
          items:
            type: string
        conf:
          x-ms-client-name: configuration
          type: object
          additionalProperties:
            type: string
        driverMemory:
          type: string
        driverCores:
          format: int32
          type: integer
        executorMemory:
          type: string
        executorCores:
          format: int32
          type: integer
        numExecutors:
          x-ms-client-name: executorCount
          format: int32
          type: integer
      required:
      - name
      - file
    SparkServiceError:
      type: object
      properties:
        message:
          type: string
        errorCode:
          type: string
        source:
          enum:
          - System
          - User
          - Unknown
          - Dependency
          x-ms-enum:
            name: SparkErrorSource
            modelAsString: true
          type: string
    SparkServicePlugin:
      type: object
      properties:
        preparationStartedAt:
          format: date-time
          type:
          - string
          - 'null'
        resourceAcquisitionStartedAt:
          format: date-time
          type:
          - string
          - 'null'
        submissionStartedAt:
          format: date-time
          type:
          - string
          - 'null'
        monitoringStartedAt:
          format: date-time
          type:
          - string
          - 'null'
        cleanupStartedAt:
          format: date-time
          type:
          - string
          - 'null'
        currentState:
          enum:
          - Preparation
          - ResourceAcquisition
          - Queued
          - Submission
          - Monitoring
          - Cleanup
          - Ended
          x-ms-enum:
            name: PluginCurrentState
            modelAsString: true
          type: string
    SparkBatchJob:
      type: object
      properties:
        livyInfo:
          $ref: '#/components/schemas/SparkBatchJobState'
        name:
          type: string
          description: The batch name.
        workspaceName:
          type: string
          description: The workspace name.
        sparkPoolName:
          type: string
          description: The Spark pool name.
        submitterName:
          type: string
          description: The submitter name.
        submitterId:
          type: string
          description: The submitter identifier.
        artifactId:
          type: string
          description: The artifact identifier.
        jobType:
          enum:
          - SparkBatch
          - SparkSession
          x-ms-enum:
            name: SparkJobType
            modelAsString: true
          type: string
          description: The job type.
        result:
          enum:
          - Uncertain
          - Succeeded
          - Failed
          - Cancelled
          x-ms-enum:
            name: SparkBatchJobResultType
            modelAsString: true
          type: string
          description: The Spark batch job result.
        schedulerInfo:
          x-ms-client-name: scheduler
          $ref: '#/components/schemas/SparkScheduler'
          description: The scheduler information.
        pluginInfo:
          x-ms-client-name: plugin
          $ref: '#/components/schemas/SparkServicePlugin'
          description: The plugin information.
        errorInfo:
          x-ms-client-name: errors
          uniqueItems: false
          type: array
          items:
            $ref: '#/components/schemas/SparkServiceError'
          description: The error information.
        tags:
          type: object
          additionalProperties:
            type: string
          description: The tags.
        id:
          format: int32
          type: integer
          description: The session Id.
        appId:
          type:
          - string
          - 'null'
          description: The application id of this session
        appInfo:
          type:
          - object
          - 'null'
          additionalProperties:
            type: string
          description: The detailed application info.
        state:
          type: string
          description: The batch state
        log:
          x-ms-client-name: logLines
          uniqueItems: false
          type:
          - array
          - 'null'
          items:
            type: string
          description: The log lines.
      required:
      - id
    SparkScheduler:
      type: object
      properties:
        submittedAt:
          format: date-time
          type:
          - string
          - 'null'
        scheduledAt:
          format: date-time
          type:
          - string
          - 'null'
        endedAt:
          format: date-time
          type:
          - string
          - 'null'
        cancellationRequestedAt:
          format: date-time
          type:
          - string
          - 'null'
        currentState:
          enum:
          - Queued
          - Scheduled
          - Ended
          x-ms-enum:
            name: SchedulerCurrentState
            modelAsString: true
          type: string
    SparkRequest:
      type: object
      properties:
        name:
          type: string
        file:
          type: string
        className:
          type: string
        args:
          x-ms-client-name: arguments
          uniqueItems: false
          type: array
          items:
            type: string
        jars:
          uniqueItems: false
          type: array
          items:
            type: string
        pyFiles:
          x-ms-client-name: pythonFiles
          uniqueItems: false
          type: array
          items:
            type: string
        files:
          uniqueItems: false
          type: array
          items:
            type: string
        archives:
          uniqueItems: false
          type: array
          items:
            type: string
        conf:
          x-ms-client-name: configuration
          type: object
          additionalProperties:
            type: string
        driverMemory:
          type: string
        driverCores:
          format: int32
          type: integer
        executorMemory:
          type: string
        executorCores:
          format: int32
          type: integer
        numExecutors:
          x-ms-client-name: executorCount
          format: int32
          type: integer
x-ms-parameterized-host:
  hostTemplate: '{endpoint}/livyApi/versions/{livyApiVersion}/sparkPools/{sparkPoolName}'
  useSchemePrefix: false
  parameters:
  - $ref: '#/components/parameters/Endpoint'
  - $ref: '#/components/parameters/LivyApiVersion'
  - $ref: '#/components/parameters/SparkPoolName'