Confirmation
Some API calls that are potentially dangerous if misused require an extra "confirmation" step to succeed. The DELETE /queues API is one example. To use an API that requires confirmation, first make a call to the API as normal. For example:
curl -kvs -c cookies.txt -b cookies.txt -X DELETE 'https://localhost:8080/queues?pattern=foo'
The initial response to this first API request will be an HTTP 202 Accepted response with a body containing a random 6-digit confirmation code:
{
"confirmation": 985812
}
At this point, the initial request has not been completed - no queues have been deleted, etc. To confirm the operation and proceed, make the original API call again, exactly as it was first made, with the same query parameters set to the same values, but with a single additional confirmation query parameter set to the value of the confirmation code received:
curl -kvs -c cookies.txt -b cookies.txt -X DELETE 'https://localhost:8080/queues?pattern=foo&confirmation=985812'
The original operation requested will now be completed and a 200 OK response will be returned. If an incorrect confirmation code is provided, the API will return a 412 Precondition Failed response instead.