ArangoDB Batch Requests API

Run multiple operations using a single request

OpenAPI Specification

arangodb-batch-requests-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    name: ArangoDB Inc.
    url: https://arango.ai
  license:
    name: Business Source License 1.1
    url: https://github.com/arangodb/arangodb/blob/devel/LICENSE
  summary: The HTTP API of the ArangoDB graph database system
  title: ArangoDB Core Batch Requests API
  version: 3.12.10 (API v0)
  description: Run multiple operations using a single request
tags:
- description: Run multiple operations using a single request
  name: Batch Requests
paths:
  /_db/{database-name}/_api/batch:
    post:
      deprecated: true
      description: '> **WARNING:**

        The `/_api/batch` endpoint was deprecated in v3.8.0 and has been removed

        in v3.12.3.



        Executes a batch request. A batch request can contain any number of

        other requests that can be sent to ArangoDB in isolation. The benefit of

        using batch requests is that batching requests requires less client/server

        roundtrips than when sending isolated requests.


        All parts of a batch request are executed serially on the server. The

        server will return the results of all parts in a single response when all

        parts are finished.


        Technically, a batch request is a multipart HTTP request, with

        content-type `multipart/form-data`. A batch request consists of an

        envelope and the individual batch part actions. Batch part actions

        are "regular" HTTP requests, including full header and an optional body.

        Multiple batch parts are separated by a boundary identifier. The

        boundary identifier is declared in the batch envelope. The MIME content-type

        for each individual batch part must be `application/x-arango-batchpart`.


        Please note that when constructing the individual batch parts, you must

        use CRLF (`\r\n`) as the line terminator as in regular HTTP messages.


        The response sent by the server will be an `HTTP 200` response, with an

        optional error summary header `x-arango-errors`. This header contains the

        number of batch part operations that failed with an HTTP error code of at

        least 400. This header is only present in the response if the number of

        errors is greater than zero.


        The response sent by the server is a multipart response, too. It contains

        the individual HTTP responses for all batch parts, including the full HTTP

        result header (with status code and other potential headers) and an

        optional result body. The individual batch parts in the result are

        separated using the same boundary value as specified in the request.


        The order of batch parts in the response will be the same as in the

        original client request. Client can additionally use the `Content-Id`

        MIME header in a batch part to define an individual id for each batch part.

        The server will return this id is the batch part responses, too.

        '
      operationId: executeBatchRequest
      parameters:
      - description: 'The name of the database.

          '
        example: _system
        in: path
        name: database-name
        required: true
        schema:
          type: string
      requestBody:
        content:
          text/plain; charset=utf-8:
            schema:
              description: 'The multipart batch request, consisting of the envelope and the individual

                batch parts.

                '
      responses:
        '200':
          description: 'is returned if the batch was received successfully. HTTP 200 is returned

            even if one or multiple batch part actions failed.

            '
        '400':
          description: 'is returned if the batch envelope is malformed or incorrectly formatted.

            This code will also be returned if the content-type of the overall batch

            request or the individual MIME parts is not as expected.

            '
        '405':
          description: 'is returned when an invalid HTTP method is used.

            '
      summary: Execute a batch request
      tags:
      - Batch Requests
externalDocs:
  description: ArangoDB Documentation
  url: https://docs.arango.ai/arangodb/