Register Batch Request

Register Batch Request

Enables you to make multiple API requests using a single request. The batch API takes in an array of logical HTTP requests represented as JSON arrays. Each request has a method (GET, PUT, POST, or DELETE), a relative_url (the portion of the URL after https://<nsx-mgr>/api/), optional headers array (corresponding to HTTP headers) and an optional body (for POST and PUT requests). The batch API returns an array of logical HTTP responses represented as JSON arrays. Each response has a status code, an optional headers array and an optional body (which is a JSON-encoded string).

Request
URI
POST
https://nsxmanager.your.domain/api/v1/batch
COPY
Query Parameters
boolean
atomic
Optional

transactional atomicity for the batch of requests embedded in the batch list


Request Body
BatchRequest of type(s) application/json
Required
{
    "requests": [
        {
            "uri": "string",
            "method": "string"
        }
    ],
    "continue_on_error": false
}
requests
Optional

requests

boolean
continue_on_error
Optional

Flag to decide if we will continue processing subsequent requests in case of current error for atomic = false.

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns BatchResponse of type(s) application/json
{
    "has_errors": false,
    "rolled_back": false,
    "results": [
        {
            "code": 0
        }
    ]
}
boolean
has_errors
Optional

Indicates if any of the APIs failed

boolean
rolled_back
Optional

Optional flag indicating that all items were rolled back even if succeeded initially

results
Required

Bulk list results


400
Returns BadRequest of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code


403
Returns Forbidden of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code


404
Returns NotFound of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code


412
Returns PreconditionFailed of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code


500
Returns InternalServerError of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code


503
Returns ServiceUnavailable of type(s) application/json
{
    "details": "string",
    "related_errors": [
        "ApiError Object"
    ],
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
object
error_data
Optional

Additional data about the error

string
details
Optional

Further details about the error

array of ApiError
related_errors
Optional

Other errors related to this error

string
module_name
Optional

The module name where the error occurred

string
error_message
Optional

A description of the error

integer As int64 As int64
error_code
Optional

A numeric error code