You can create and update multiple resources simultaneously and thus minimize network traffic. For example, you can add multiple load balancing virtual servers in the same operation. To perform a bulk operation, specify the required parameters in the same request payload.
To account for the failure of some operations within the bulk operation, NITRO allows you to configure one of the following behaviors:
- Exit. When the first error is encountered, the execution stops. The NITRO operations that were executed before the error are committed. This is the default behavior.
- Rollback. When the first error is encountered, the execution stops. The NITRO operations that were executed before the error are rolled back. Rollback is only supported for add and bind NITRO operations.
- Continue. All the NITRO operations in the list are executed even if some operations fail.
You must specify the behavior of the bulk operation in the request header using the X-NITRO-ONERROR parameter.
For example, to add two load balancing virtual servers in one operation, and continue even if one of the add operation fails:
- HTTP Method
- Request Headers
- Request Payload
- HTTP Status Code on Success
- 201 Created for the add operation and 200 OK for the update operation.
- HTTP Status Code on Failure
- 207 Multi Status with error details in the response payload. For more information, see Error Handling.