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

Success

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

results


default

Unexpected error

Returns ApiError of type(s) application/json
{
    "module_name": "string",
    "error_message": "string",
    "error_code": 0
}
string
module_name
Optional

module_name

string
error_message
Optional

error_message

integer As int64 As int64
error_code
Optional

error_code