Help Center> Bare Metal Server> API Reference> BMS APIs> BMS Disk Management> Querying EVS Disks Attached to a BMS
Updated on 2024-01-31 GMT+08:00

Querying EVS Disks Attached to a BMS

Function

This API is used to query EVS disks attached to a BMS.

URI

GET /v1/{project_id}/baremetalservers/{server_id}/os-volume_attachments

Table 1 lists the parameters.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

For details about how to obtain the project ID, see Obtaining a Project ID.

server_id

Yes

Specifies the BMS ID.

You can obtain the BMS ID from the BMS console or by calling the Querying BMSs (Native OpenStack API).

Request Parameters

None

Example Request

Querying EVS disks attached to a BMS (ID: 4d8c3732-a248-40ed-bebc-539a6ffd25c0)
1
GET https://{BMS Endpoint}/v1/bbf1946d374b44a0a2a95533562ba954/baremetalservers/4d8c3732-a248-40ed-bebc-539a6ffd25c0/os-volume_attachments

Response Parameters

Parameter

Type

Description

volumeAttachments

Array of objects

Specifies disks attached to a BMS. For details, see Table 2.

Table 2 volumeAttachments field data structure description

Parameter

Type

Description

device

String

Specifies the mount directory, for example, dev/sdd.

id

String

Specifies the ID of the attached resource.

serverId

String

Specifies the ID of the BMS to which the disk is attached.

volumeId

String

Specifies the ID of the disk attached to the BMS.

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
{
    "volumeAttachments": [
        {
            "device": "/dev/sdd",
            "id": "a26887c6-c47b-4654-abb5-dfadf7d3f803",
            "serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
            "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f803"
        },
        {
            "device": "/dev/sdc",
            "id": "a26887c6-c47b-4654-abb5-dfadf7d3f804",
            "serverId": "4d8c3732-a248-40ed-bebc-539a6ffd25c0",
            "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f804"
        }
    ]
}

Returned Values

Normal values

Returned Values

Description

200

The request has been successfully processed.

For details about other returned values, see Status Codes.

Error Codes

See Error Codes.