Detaching volumes from virtual machines

DELETE /servers/{server_id}/os-volume_attachments/{volume_id}

Detach a volume from the given virtual machine.

This is an asynchronous API, callers should poll the status and list of volume attachments within the volume API, to determine when the detachment has completed successfully.




Name In Type Description
server_id path string The UUID of the server.
volume_id path string The UUID of the volume to detach.


Detach a volume with the specified ID from a VM with the specified ID.

# curl -ks -X DELETE -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \


Status codes


Code Reason
202 - Accepted

Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request.


Code Reason
400 - Bad Request

Some content in the request was invalid.

401 - Unauthorized

User must authenticate before making a request.

403 - Forbidden

Policy does not allow current user to do this operation.

404 - Not Found

The requested resource could not be found.

409 - Conflict

This operation conflicted with another operation on this resource.