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).
transactional atomicity for the batch of requests embedded in the batch list
{
"requests": [
{
"uri": "string",
"method": "string"
}
],
"continue_on_error": false
}
Flag to decide if we will continue processing subsequent requests in case of current error for atomic = false.
Success
{
"has_errors": false,
"rolled_back": false,
"results": [
{
"code": 0
}
]
}
Indicates if any of the APIs failed
Optional flag indicating that all items were rolled back even if succeeded initially
Unexpected error
{
"module_name": "string",
"error_message": "string",
"error_code": 0
}
module_name
error_message
error_code