Querying Details About BMSs
Function
This API is used to query BMSs by filters and display details about the BMSs.
The information that can be queried includes the BMS billing mode and whether the BMS is frozen.
URI
GET /v1/{project_id}/baremetalservers/detail
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
flavor |
No |
String |
Specifies the ID of the BMS flavor. |
name |
No |
String |
Specifies the BMS name. |
status |
No |
String |
Specifies the BMS status. Value range:
|
limit |
No |
Integer |
Specifies the number of BMSs displayed on each page. The default value is 25 and maximum value is 1000. |
offset |
No |
Integer |
This API is a pagination query API. offset indicates the page number (the start page number is 1). The returned value contains the number of BMSs and details about the BMSs.
|
tags |
No |
String |
Specifies the BMS tag. The value can be:
|
reservation_id |
No |
String |
Specifies the reserved ID, which can be used to query BMSs created in a batch. |
detail |
No |
String |
Specifies the level for details about BMS query results. A higher level indicates more details about BMS query results. Available levels include 4, 3, 2, and 1. The default level is 4. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the flavor ID of a BMS. |
name |
String |
Specifies the flavor name of a BMS. |
disk |
String |
Specifies the system disk size in the BMS flavor. The value 0 indicates that the disk size is not limited. |
vcpus |
String |
Specifies the number of CPU cores in the BMS flavor. |
ram |
String |
Specifies the memory size (MB) in the BMS flavor. |
Request Parameters
None
Example Request
Querying BMSs bound to all enterprise projects of the user
1
|
GET https://{BMS Endpoint}/v1/bbf1946d374b44a0a2a95533562ba954/baremetalservers/detail?offset=1&limit=2&enterprise_project_id=all_granted_eps |
Response Parameters
Parameter |
Type |
Description |
---|---|---|
servers |
List data structure |
Specifies details about BMSs. For details, see Querying BMS Details. The returned details vary depending on the query level. |
count |
Integer |
Specifies the number of BMSs that match the filters. |
Example Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
{ "count": 2, "servers": [ { "id": "b544be62-1b3b-4982-ad98-572b002ac23b", "name": "bms-test1", "addresses": { "5849fdf1-9d79-4589-80c2-fe557990c417": [ { "version": "4", "addr": "192.168.1.63", "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:3a:8d:f1", "OS-EXT-IPS:port_id": "c79d2813-94c9-4135-973e-cbf5d23e78e6", "OS-EXT-IPS:type": "fixed" } ] }, "flavor": { "disk": "9309", "vcpus": "32", "ram": "193047", "id": "physical.s1.medium.ondemand", "name": "physical.s1.medium.ondemand" }, "accessIPv4": "", "accessIPv6": "", "status": "ACTIVE", "progress": 0, "hostId": "cd243addb5d2c64e89218180b7a3ed95abe6882e81c337cc563137df", "updated": "2018-09-10T01:20:58Z", "created": "2018-09-06T09:29:27Z", "metadata": { "baremetalPortIDList": "[c79d2813-94c9-4135-973e-cbf5d23e78e6]", "chargingMode": "0" }, "tags": [ "__type_baremetal" ], "description": "bms-test1", "locked": false, "config_drive": "", "tenant_id": "bbf1946d374b44a0a2a95533562ba954", "user_id": "0c50494c5816425eb05c40b5e81ab65a", "key_name": "$key_name", "OS-EXT-STS:power_state": 1, "OS-EXT-STS:vm_state": "active", "OS-EXT-SRV-ATTR:host": "bms.dc1", "OS-EXT-SRV-ATTR:instance_name": "instance-0014bdc2", "OS-EXT-SRV-ATTR:hypervisor_hostname": "nova002@2", "OS-DCF:diskConfig": "MANUAL", "OS-EXT-AZ:availability_zone": "az-dc-1", "os:scheduler_hints": {}, "OS-EXT-SRV-ATTR:root_device_name": "/dev/vda", "OS-EXT-SRV-ATTR:ramdisk_id": "", "enterprise_project_id": "0", "OS-SRV-USG:launched_at": "2018-09-06T09:30:36.000000", "OS-EXT-SRV-ATTR:kernel_id": "", "OS-EXT-SRV-ATTR:launch_index": 0, "host_status": "UP", "OS-EXT-SRV-ATTR:reservation_id": "r-qjad3fv0", "OS-EXT-SRV-ATTR:hostname": "bms-test1", "sys_tags": [ { "key": "_sys_enterprise_project_id", "value": "0" } ] }, { "id": "a1541cfc-8ac3-43e9-a70d-b8d4b395b256", "name": "bms_test2", "addresses": { "5849fdf1-9d79-4589-80c2-fe557990c417": [ { "version": "4", "addr": "192.168.1.50", "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:8f:38:2c", "OS-EXT-IPS:port_id": "460aa585-9f83-4719-9527-fc39ebaca9aa", "OS-EXT-IPS:type": "fixed" } ] }, "flavor": { "disk": "9309", "vcpus": "32", "ram": "193047", "id": "physical.s1.medium", "name": "physical.s1.medium" }, "accessIPv4": "", "accessIPv6": "", "status": "SHUTOFF", "hostId": "cd243addb5d2c64e89218180b7a3ed95abe6882e81c337cc563137df", "updated": "2018-09-06T10:00:25Z", "created": "2018-08-30T12:40:47Z", "metadata": { "metering.order_id": "CS18083020422CNV9", "baremetalPortIDList": "[460aa585-9f83-4719-9527-fc39ebaca9aa]", "metering.product_id": "00301-167001-0--0", "chargingMode": "1" }, "tags": [ "__type_baremetal", "_sys_enterprise_project_id=9dd1131d-71fd-40fe-8f14-3fe6b6b5ef8b", "key1=value1", "three=3", "two=2" ], "description": "bms_test2", "locked": false, "config_drive": "", "tenant_id": "bbf1946d374b44a0a2a95533562ba954", "user_id": "3fc5ab2b0c544979abcaafd86edd80e6", "key_name": "$key_name", "OS-EXT-STS:power_state": 4, "OS-EXT-STS:vm_state": "stopped", "OS-EXT-SRV-ATTR:host": "bms.dc1", "OS-EXT-SRV-ATTR:instance_name": "instance-0014581b", "OS-EXT-SRV-ATTR:hypervisor_hostname": "nova002@2", "OS-DCF:diskConfig": "MANUAL", "OS-EXT-AZ:availability_zone": "az-dc-1", "os:scheduler_hints": {}, "OS-EXT-SRV-ATTR:root_device_name": "/dev/vda", "OS-EXT-SRV-ATTR:ramdisk_id": "", "enterprise_project_id": "0", "OS-SRV-USG:launched_at": "2018-08-30T12:42:10.000000", "OS-EXT-SRV-ATTR:kernel_id": "", "OS-EXT-SRV-ATTR:launch_index": 0, "host_status": "UP", "OS-EXT-SRV-ATTR:reservation_id": "r-i5w3yc9a", "OS-EXT-SRV-ATTR:hostname": "bms-test2", "sys_tags": [ { "key": "_sys_enterprise_project_id", "value": "0" } ] } ] } |
Returned 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.