Attachments

Volume attachment management

List attachments

get

Lists all volume attachments

Authorizations
X-Auth-TokenstringRequired

OpenStack authentication token

Query parameters
limitinteger · min: 1Optional

Requests a page size of items

markerstringOptional

The ID of the last-seen item

sortstringOptional

Comma-separated list of sort keys and optional sort directions

instance_idstringOptional

Filter by instance ID

volume_idstringOptional

Filter by volume ID

statusstringOptional

Filter by attachment status

attach_statusstringOptional

Filter by attach status

Responses
200

OK

application/json
get
/v3/attachments
GET /v3/v3/attachments HTTP/1.1
Host: example.com
X-Auth-Token: YOUR_API_KEY
Accept: */*
200

OK

{
  "attachments": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "volume_id": "123e4567-e89b-12d3-a456-426614174000",
      "instance": "123e4567-e89b-12d3-a456-426614174000",
      "status": "text",
      "attach_mode": "text",
      "attached_at": "2025-11-28T20:26:54.355Z",
      "detached_at": "2025-11-28T20:26:54.355Z",
      "connector": {},
      "connection_info": {}
    }
  ]
}

Create attachment

post

Creates a volume attachment

Authorizations
X-Auth-TokenstringRequired

OpenStack authentication token

Body
Responses
200

OK

application/json
post
/v3/attachments
POST /v3/v3/attachments HTTP/1.1
Host: example.com
X-Auth-Token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 151

{
  "attachment": {
    "volume_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "instance_uuid": "123e4567-e89b-12d3-a456-426614174000",
    "connector": {},
    "mode": "rw"
  }
}
200

OK

{
  "attachment": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "volume_id": "123e4567-e89b-12d3-a456-426614174000",
    "instance": "123e4567-e89b-12d3-a456-426614174000",
    "status": "text",
    "attach_mode": "text",
    "attached_at": "2025-11-28T20:26:54.355Z",
    "detached_at": "2025-11-28T20:26:54.355Z",
    "connector": {},
    "connection_info": {}
  }
}

Show attachment details

get

Shows details for an attachment

Authorizations
X-Auth-TokenstringRequired

OpenStack authentication token

Path parameters
attachment_idstring · uuidRequired

The UUID of the attachment

Responses
200

OK

application/json
get
/v3/attachments/{attachment_id}
GET /v3/v3/attachments/{attachment_id} HTTP/1.1
Host: example.com
X-Auth-Token: YOUR_API_KEY
Accept: */*
200

OK

{
  "attachment": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "volume_id": "123e4567-e89b-12d3-a456-426614174000",
    "instance": "123e4567-e89b-12d3-a456-426614174000",
    "status": "text",
    "attach_mode": "text",
    "attached_at": "2025-11-28T20:26:54.355Z",
    "detached_at": "2025-11-28T20:26:54.355Z",
    "connector": {},
    "connection_info": {}
  }
}

Update attachment

put

Updates an attachment

Authorizations
X-Auth-TokenstringRequired

OpenStack authentication token

Path parameters
attachment_idstring · uuidRequired

The UUID of the attachment

Body
Responses
200

OK

application/json
put
/v3/attachments/{attachment_id}
PUT /v3/v3/attachments/{attachment_id} HTTP/1.1
Host: example.com
X-Auth-Token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 31

{
  "attachment": {
    "connector": {}
  }
}
200

OK

{
  "attachment": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "volume_id": "123e4567-e89b-12d3-a456-426614174000",
    "instance": "123e4567-e89b-12d3-a456-426614174000",
    "status": "text",
    "attach_mode": "text",
    "attached_at": "2025-11-28T20:26:54.355Z",
    "detached_at": "2025-11-28T20:26:54.355Z",
    "connector": {},
    "connection_info": {}
  }
}

Delete attachment

delete

Deletes an attachment

Authorizations
X-Auth-TokenstringRequired

OpenStack authentication token

Path parameters
attachment_idstring · uuidRequired

The UUID of the attachment

Responses
200

OK

application/json
delete
/v3/attachments/{attachment_id}
DELETE /v3/v3/attachments/{attachment_id} HTTP/1.1
Host: example.com
X-Auth-Token: YOUR_API_KEY
Accept: */*
200

OK

{
  "attachment_ids": [
    "text"
  ]
}

Complete attachment

post

Mark a volume attachment process as completed (in-use)

Authorizations
X-Auth-TokenstringRequired

OpenStack authentication token

Path parameters
attachment_idstring · uuidRequired

The UUID of the attachment

Body
os-completeobjectOptional
Responses
post
/v3/attachments/{attachment_id}/action
POST /v3/v3/attachments/{attachment_id}/action HTTP/1.1
Host: example.com
X-Auth-Token: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "os-complete": {}
}
204

No Content

No content

Last updated

Was this helpful?