The Cancel Batch API is called while uploading files to cancel a batch upload. Note that in some cases it may not be possible to cancel a batch upload. Use the returned state to check the new batch state.
Method URL
PUT http://<zapi_url>:<zapi_port>/api/v2/batch/<batch_id>