• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Cinder V2 Interfaces
  5. Volumes
  6. Detach volume from a server (Abandoned and not Recommended)

Detach volume from a server (Abandoned and not Recommended)

Function Description

This interface is used to detach volumes from a VM.

Interface Format

Method

URI

Description

POST

/v2/{tenant_id}/volumes/{volume_id}/action

action='os-detach'

Detaches volumes from a VM.

Restrictions

This interface can only be used to change the volume status from in-use to available and cannot be used to detach volumes from a VM.

To detach volumes from a VM, you are advised to call the Detach Volume API of Nova.

Expanded Interface

N/A

Request Parameter

Parameter

Type

Mandatory

Remarks

attachment_id

String

No

ID recording the attaching information in the volume

Response Parameter

N/A

Request Example

POST 
https://volume.localdomain.com:8776/v2/fa9acd30b02d4704bbd62cd6fb24fe01/volumes/ff9920a4-8d7a-49a9-9991-e28e355588cf/actionhttps://volume.localdomain.com:8776/v2/fa9acd30b02d4704bbd62cd6fb24fe01/volumes/ff9920a4-8d7a-49a9-9991-e28e355588cf/action
{
" os-detach ": {
          " attachment_id ": " afff4ef7-eae8-49e8-b968-1e3dff327392 "
           }
}

Response Example

N/A

Error Code

See section Processing Return Code.