doc-exports/docs/bms/api-ref/en-us_topic_0053158693.html
guoyanyan c311ecafe3 bms_api_0510
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: guoyanyan <guoyanyan3@huawei.com>
Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
2023-10-11 08:28:11 +00:00

329 lines
35 KiB
HTML

<a name="EN-US_TOPIC_0053158693"></a><a name="EN-US_TOPIC_0053158693"></a>
<h1 class="topictitle1">Querying <span id="text1027592519399">BMS</span><span id="text4471525808"></span><span id="text107892040132114"></span>s (Native OpenStack API)</h1>
<div id="body62795050"><div class="section" id="EN-US_TOPIC_0053158693__section56354875"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0053158693__p53234283">This API is used to query <span id="EN-US_TOPIC_0053158693__text1669026315">BMS</span><span id="EN-US_TOPIC_0053158693__text1968164914717"></span><span id="EN-US_TOPIC_0053158693__text20901104616219"></span>s.</p>
</div>
<div class="section" id="EN-US_TOPIC_0053158693__section54054835151740"><h4 class="sectiontitle">Constraints</h4><ul id="EN-US_TOPIC_0053158693__ul13401688151752"><li id="EN-US_TOPIC_0053158693__li4809898812125">The query result returned by this interface includes both ECSs and BMSs. You need to filter out the BMSs using the flavor used to create the BMSs or the tags added to the BMSs during BMS creation.</li><li id="EN-US_TOPIC_0053158693__li28677616151752">If the image is used as the search criteria, other search criteria and pagination criteria are not supported. If both the image and other search criteria are used, the BMSs are filtered out by image. If the image is not used as the search criteria, this interface has no restrictions.</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0053158693__section37431827"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0053158693__p52202597152536">GET /v2.1/{project_id}/servers{?changes-since={changes-since}&amp;image={image}&amp;flavor={flavor}&amp;name={name}&amp;status={status}&amp;limit={limit}&amp;marker={marker}&amp;tags={tags}&amp;not-tags={not-tags}&amp;reservation_id={reservation_id}&amp;sort_key={sort_key}&amp;sort_dir={sort_dir}}</p>
<p id="EN-US_TOPIC_0053158693__p83079415111"><a href="#EN-US_TOPIC_0053158693__table67612156510">Table 1</a> lists the parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0053158693__table67612156510"></a><a name="table67612156510"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158693__table67612156510" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0053158693__row67810155512"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.4.2.4.1.1"><p id="EN-US_TOPIC_0053158693__p47678793154517">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.4.2.4.1.2"><p id="EN-US_TOPIC_0053158693__p62557569154517">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.4.2.4.1.3"><p id="EN-US_TOPIC_0053158693__p37549795154517">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0053158693__row17821535110"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0053158693__p1019106154517">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0053158693__p15438763154517">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0053158693__p42580325154517">Specifies the project ID.</p>
<p id="EN-US_TOPIC_0053158693__p9141450142010">For how to obtain the project ID, see <a href="https://docs.otc.t-systems.com/en-us/api/apiug/apig-en-api-180328009.html" target="_blank" rel="noopener noreferrer">Obtaining Required Information</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0053158693__section131361554145510"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0053158693__ul1280516016567"><li id="EN-US_TOPIC_0053158693__li6805107562">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158693__table1758718426522" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0053158693__row1458874235211"><th align="left" class="cellrowborder" valign="top" width="19.85%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="EN-US_TOPIC_0053158693__p59978491115233">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.39%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="EN-US_TOPIC_0053158693__p26419641115233">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.75%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="EN-US_TOPIC_0053158693__p59616187115233">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="41.010000000000005%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="EN-US_TOPIC_0053158693__p64181866115233">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0053158693__row686311283276"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p10447191065310">changes-since</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p644915104533">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p13454131016536">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p445791014538">Specifies the timestamp of the last <span id="EN-US_TOPIC_0053158693__text121698161638">BMS</span><span id="EN-US_TOPIC_0053158693__text216912161937"></span><span id="EN-US_TOPIC_0053158693__text20901175913213"></span> status update. The parameter is in ISO 8601 time format, for example, <strong id="EN-US_TOPIC_0053158693__b119409183716">2013-06-09T06:42:18Z</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row16588164215216"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p17387161075313">image</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p123900108538">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p2393161013538">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p1339701010533">Specifies the image ID.</p>
<div class="note" id="EN-US_TOPIC_0053158693__note623794911339"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0053158693__p17237114943316">If the image is used as the search criteria, other search criteria and pagination criteria are not supported. If both the image and other search criteria are used, the BMS details are filtered out by image. If the image is not used as the search criteria, this interface has no restrictions.</p>
</div></div>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row05881842195216"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p839991012531">flavor</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p12402210155311">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p15406610135318">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p1040881015311">Specifies the flavor ID.</p>
<p id="EN-US_TOPIC_0053158693__p7741128113511">You can obtain the flavor ID from the <span id="EN-US_TOPIC_0053158693__text9235625735">BMS</span><span id="EN-US_TOPIC_0053158693__text32351725734"></span><span id="EN-US_TOPIC_0053158693__text1726413615226"></span> console or using the <a href="en-us_topic_0053158684.html">Querying BMS Flavors (Native OpenStack API)</a> API.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row058811420527"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p5413201085313">name</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p1941781012535">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p3422121055318">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p842631015536">Specifies the <span id="EN-US_TOPIC_0053158693__text13209132811312">BMS</span><span id="EN-US_TOPIC_0053158693__text920922816319"></span><span id="EN-US_TOPIC_0053158693__text1185164116225"></span> name. This parameter supports fuzzy matching.</p>
<p id="EN-US_TOPIC_0053158693__p7429181015313">For example, the regular expression <strong id="EN-US_TOPIC_0053158693__b84235270616859">?name=bob</strong> will return both <strong id="EN-US_TOPIC_0053158693__b84235270616910">bob</strong> and <strong id="EN-US_TOPIC_0053158693__b84235270616915">bobb</strong>. To obtain only <strong id="EN-US_TOPIC_0053158693__b84235270616107">bob</strong>, you can use a regular expression matching the basic database syntax, such as MySQL or PostgreSQL (official website: <a href="https://www.postgresql.org/docs/9.2/static/functions-matching.html" target="_blank" rel="noopener noreferrer">https://www.postgresql.org/docs/9.2/static/functions-matching.html</a>).</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row105881642195217"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p1743421075315">status</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p843711020539">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p11440101010537">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p7441161020531">Specifies the <span id="EN-US_TOPIC_0053158693__text4817131535">BMS</span><span id="EN-US_TOPIC_0053158693__text1781773117312"></span><span id="EN-US_TOPIC_0053158693__text11930144642214"></span> status.</p>
<p id="EN-US_TOPIC_0053158693__p117067951617">Value range:</p>
<ul id="EN-US_TOPIC_0053158693__ul29109448426"><li id="EN-US_TOPIC_0053158693__en-us_topic_0113746489_li9580165880"><strong id="EN-US_TOPIC_0053158693__en-us_topic_0113746489_b23014110118">ACTIVE</strong>: Running, Stopping, Deleting</li><li id="EN-US_TOPIC_0053158693__en-us_topic_0113746489_li95808512814"><strong id="EN-US_TOPIC_0053158693__en-us_topic_0113746489_b56772617123">BUILD</strong>: Creating</li><li id="EN-US_TOPIC_0053158693__en-us_topic_0113746489_li1058014518817"><strong id="EN-US_TOPIC_0053158693__en-us_topic_0113746489_b2334141210">ERROR</strong>: Faulty</li><li id="EN-US_TOPIC_0053158693__en-us_topic_0113746489_li2058015888"><strong id="EN-US_TOPIC_0053158693__en-us_topic_0113746489_b1059115316129">HARD_REBOOT</strong>: Forcibly Restarting</li><li id="EN-US_TOPIC_0053158693__en-us_topic_0113746489_li15580351085"><strong id="EN-US_TOPIC_0053158693__en-us_topic_0113746489_b391019910131">REBOOT</strong>: Restarting</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row16588142145219"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p1445843114279">limit</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p15457103122713">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p15455113112714">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p345110316275">Specifies the number of <span id="EN-US_TOPIC_0053158693__text59831335739">BMS</span><span id="EN-US_TOPIC_0053158693__text1098373515319"></span><span id="EN-US_TOPIC_0053158693__text022714550226"></span>s displayed on each page.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row12307152919453"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p34602410233">marker</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p1946094112310">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p14460249231">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p174601046239">Specifies the <span id="EN-US_TOPIC_0053158693__text71323381731">BMS</span><span id="EN-US_TOPIC_0053158693__text613212389311"></span><span id="EN-US_TOPIC_0053158693__text1136212911239"></span> ID to which the marker corresponds. The query will start from the next ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row14320610478"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p5324615479">tags</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p143218664715">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p143211619479">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p123246194714">Queries the <span id="EN-US_TOPIC_0053158693__text142391140333">BMS</span><span id="EN-US_TOPIC_0053158693__text162393401630"></span><span id="EN-US_TOPIC_0053158693__text1349711351236"></span>s with specified tags.</p>
<p id="EN-US_TOPIC_0053158693__p12820165216471">Added in micro version 2.26.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row1658884211523"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p203418324539">not-tags</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p173673215532">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p238132105317">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p154313328536">Queries the <span id="EN-US_TOPIC_0053158693__text179892421232">BMS</span><span id="EN-US_TOPIC_0053158693__text149891342231"></span><span id="EN-US_TOPIC_0053158693__text8743145492312"></span>s with tags not containing the specified value. The value is a list of tag keys.</p>
<div class="note" id="EN-US_TOPIC_0053158693__note124521913175616"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0053158693__p1745221311560">If the tags added before the function upgrade are in the format of "Key.Value", query tags using "Key".</p>
<p id="EN-US_TOPIC_0053158693__p213418685710">For example, an existing tag is <strong id="EN-US_TOPIC_0053158693__b84235270610509">a.b</strong>. After the tag function upgrade, query the tag using "not-tags=a".</p>
</div></div>
<p id="EN-US_TOPIC_0053158693__p19441232135317">Added in micro version 2.26.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row1158812424528"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p184717323539">reservation_id</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p1650832195311">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p1453143220535">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p5551832185311">Specifies the reserved ID, which can be used to query <span id="EN-US_TOPIC_0053158693__text63205019314">BMS</span><span id="EN-US_TOPIC_0053158693__text734501833"></span><span id="EN-US_TOPIC_0053158693__text051415382410"></span>s created in a batch.</p>
<p id="EN-US_TOPIC_0053158693__p45753218534">Added in micro version 2.26.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row1758864217526"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p10633321531">sort_key</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p106613212531">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p196963275311">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p167133212536">Specifies the BMS sorting attribute, which can be the <span id="EN-US_TOPIC_0053158693__text62627567316">BMS</span><span id="EN-US_TOPIC_0053158693__text1726217563313"></span><span id="EN-US_TOPIC_0053158693__text145159142413"></span> UUID (<strong id="EN-US_TOPIC_0053158693__b1735217112617">uuid</strong>), <span id="EN-US_TOPIC_0053158693__text142381559638">BMS</span><span id="EN-US_TOPIC_0053158693__text22392599316"></span><span id="EN-US_TOPIC_0053158693__text15398101592410"></span> status (<strong id="EN-US_TOPIC_0053158693__b575761619614">vm_state</strong>), <span id="EN-US_TOPIC_0053158693__text135136112411">BMS</span><span id="EN-US_TOPIC_0053158693__text6513116415"></span><span id="EN-US_TOPIC_0053158693__text11112162252416"></span> name (<strong id="EN-US_TOPIC_0053158693__b027110341562">display_name</strong>), <span id="EN-US_TOPIC_0053158693__text1810916516416">BMS</span><span id="EN-US_TOPIC_0053158693__text17109175241"></span><span id="EN-US_TOPIC_0053158693__text153629289241"></span> task status (<strong id="EN-US_TOPIC_0053158693__b145994513618">task_state</strong>), power status (<strong id="EN-US_TOPIC_0053158693__b9292451066">power_state</strong>), creation time (<strong id="EN-US_TOPIC_0053158693__b30356567">created_at</strong>), last time when the <span id="EN-US_TOPIC_0053158693__text1058920618712">BMS</span><span id="EN-US_TOPIC_0053158693__text1059536977"></span> is updated (<strong id="EN-US_TOPIC_0053158693__b9391131672">updated_at</strong>), and AZ (<strong id="EN-US_TOPIC_0053158693__b198324171673">availability_zone</strong>). You can specify multiple <strong id="EN-US_TOPIC_0053158693__b8423527061280">sort_key</strong> and <strong id="EN-US_TOPIC_0053158693__b8423527061289">sort_dir</strong> pairs.</p>
<p id="EN-US_TOPIC_0053158693__p1321581482211">The default sorting is the reverse order by <strong id="EN-US_TOPIC_0053158693__b6725857464">created_at</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row135891242165217"><td class="cellrowborder" valign="top" width="19.85%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158693__p1327414444539">sort_dir</p>
</td>
<td class="cellrowborder" valign="top" width="20.39%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158693__p16275104445317">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.75%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158693__p202804443536">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.010000000000005%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158693__p15283154425314">Specifies the sorting direction.</p>
<ul id="EN-US_TOPIC_0053158693__ul22858441530"><li id="EN-US_TOPIC_0053158693__li13286944165313"><strong id="EN-US_TOPIC_0053158693__b2483023315742">asc</strong>: The query results are displayed in ascending order.</li><li id="EN-US_TOPIC_0053158693__li10289194405314"><strong id="EN-US_TOPIC_0053158693__b191712644011">desc</strong> (default value): The query results are displayed in descending order.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0053158693__li596115314564">Example request<ul id="EN-US_TOPIC_0053158693__ul0896172616537"><li id="EN-US_TOPIC_0053158693__li389682695311">With no optional parameter<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0053158693__screen18132111314570"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">GET</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{ECS Endpoint}/v2.1/bbf1946d374b44a0a2a95533562ba954/servers</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0053158693__li9758634155617">With an optional parameter<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0053158693__screen216453912571"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">GET</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{ECS Endpoint}/v2.1/bbf1946d374b44a0a2a95533562ba954/servers?tags=__type_baremetal</span>
</pre></div></td></tr></table></div>
</div>
</li><li id="EN-US_TOPIC_0053158693__li827916459568">With multiple optional parameters<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0053158693__screen616014248583"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">GET</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{ECS Endpoint}/v2.1/bbf1946d374b44a0a2a95533562ba954/servers?tags=__type_baremetal&amp;name=bms-test01</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0053158693__section12079142"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0053158693__ul36817211"><li id="EN-US_TOPIC_0053158693__li57166532">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158693__table44736746" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0053158693__row8242429"><th align="left" class="cellrowborder" valign="top" width="23.36%" id="mcps1.3.5.2.1.1.1.4.1.1"><p id="EN-US_TOPIC_0053158693__p09797427505">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.22%" id="mcps1.3.5.2.1.1.1.4.1.2"><p id="EN-US_TOPIC_0053158693__p8982164210504">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.42%" id="mcps1.3.5.2.1.1.1.4.1.3"><p id="EN-US_TOPIC_0053158693__p1898519426507">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0053158693__row18745119"><td class="cellrowborder" valign="top" width="23.36%" headers="mcps1.3.5.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0053158693__p41959665">servers</p>
</td>
<td class="cellrowborder" valign="top" width="25.22%" headers="mcps1.3.5.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0053158693__p16804102">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="51.42%" headers="mcps1.3.5.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0053158693__p36377578">Specifies the <span id="EN-US_TOPIC_0053158693__text542414112416">BMS</span><span id="EN-US_TOPIC_0053158693__text74251911344"></span><span id="EN-US_TOPIC_0053158693__text59203711243"></span> list. For details, see <a href="#EN-US_TOPIC_0053158693__table11253402">Table 2</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0053158693__table11253402"></a><a name="table11253402"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158693__table11253402" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="EN-US_TOPIC_0053158693__b197231743163214">servers</strong> field data structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0053158693__row10267559"><th align="left" class="cellrowborder" valign="top" width="23.599999999999998%" id="mcps1.3.5.2.1.2.2.4.1.1"><p id="EN-US_TOPIC_0053158693__p689134705020">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.380000000000003%" id="mcps1.3.5.2.1.2.2.4.1.2"><p id="EN-US_TOPIC_0053158693__p79316472500">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.019999999999996%" id="mcps1.3.5.2.1.2.2.4.1.3"><p id="EN-US_TOPIC_0053158693__p1991747185016">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0053158693__row15663"><td class="cellrowborder" valign="top" width="23.599999999999998%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0053158693__p1268752">name</p>
</td>
<td class="cellrowborder" valign="top" width="25.380000000000003%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0053158693__p2786131">String</p>
</td>
<td class="cellrowborder" valign="top" width="51.019999999999996%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0053158693__p24350086">Specifies the <span id="EN-US_TOPIC_0053158693__text46502131440">BMS</span><span id="EN-US_TOPIC_0053158693__text16500131412"></span><span id="EN-US_TOPIC_0053158693__text187365428242"></span> name.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row17824184"><td class="cellrowborder" valign="top" width="23.599999999999998%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0053158693__p34472770">id</p>
</td>
<td class="cellrowborder" valign="top" width="25.380000000000003%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0053158693__p18974148">String</p>
</td>
<td class="cellrowborder" valign="top" width="51.019999999999996%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0053158693__p60510987">Specifies the unique ID of the <span id="EN-US_TOPIC_0053158693__text163215161641">BMS</span><span id="EN-US_TOPIC_0053158693__text6321216147"></span><span id="EN-US_TOPIC_0053158693__text373510479247"></span>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row7727977"><td class="cellrowborder" valign="top" width="23.599999999999998%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0053158693__p21986423">links</p>
</td>
<td class="cellrowborder" valign="top" width="25.380000000000003%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0053158693__p14181463161150">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="51.019999999999996%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0053158693__p52375797">Specifies shortcut links of the <span id="EN-US_TOPIC_0053158693__text14899617746">BMS</span><span id="EN-US_TOPIC_0053158693__text28997171941"></span><span id="EN-US_TOPIC_0053158693__text2715115372412"></span>. For details, see <a href="#EN-US_TOPIC_0053158693__table64121649">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0053158693__table64121649"></a><a name="table64121649"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158693__table64121649" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0053158693__b172376873314">links</strong> field data structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0053158693__row59320951"><th align="left" class="cellrowborder" valign="top" width="23.86%" id="mcps1.3.5.2.1.3.2.4.1.1"><p id="EN-US_TOPIC_0053158693__p189635514509">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.240000000000002%" id="mcps1.3.5.2.1.3.2.4.1.2"><p id="EN-US_TOPIC_0053158693__p79654516507">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.9%" id="mcps1.3.5.2.1.3.2.4.1.3"><p id="EN-US_TOPIC_0053158693__p12968551135019">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0053158693__row61486274"><td class="cellrowborder" valign="top" width="23.86%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0053158693__p14332335">rel</p>
</td>
<td class="cellrowborder" valign="top" width="25.240000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0053158693__p14933841">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.9%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><p id="EN-US_TOPIC_0053158693__p1681623">Specifies the shortcut link marker name. The value can be:</p>
<ul id="EN-US_TOPIC_0053158693__ul207311644172510"><li id="EN-US_TOPIC_0053158693__en-us_topic_0131326852_li1013032685313"><strong id="EN-US_TOPIC_0053158693__en-us_topic_0131326852_b320113110516">self</strong>: resource link that contains the version number. It is used when immediate tracing is required.</li><li id="EN-US_TOPIC_0053158693__en-us_topic_0131326852_li14448163219533"><strong id="EN-US_TOPIC_0053158693__en-us_topic_0131326852_b84171947711">bookmark</strong>: resource link that can be stored for a long time.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0053158693__row15134612"><td class="cellrowborder" valign="top" width="23.86%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0053158693__p17944037">href</p>
</td>
<td class="cellrowborder" valign="top" width="25.240000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0053158693__p21885054">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.9%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><p id="EN-US_TOPIC_0053158693__p27858965">Specifies the corresponding shortcut link.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="EN-US_TOPIC_0053158693__ul1716377110309"><li id="EN-US_TOPIC_0053158693__li2025621710309">Example response<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0053158693__screen60366293141044"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
<span class="normal"> 3</span>
<span class="normal"> 4</span>
<span class="normal"> 5</span>
<span class="normal"> 6</span>
<span class="normal"> 7</span>
<span class="normal"> 8</span>
<span class="normal"> 9</span>
<span class="normal">10</span>
<span class="normal">11</span>
<span class="normal">12</span>
<span class="normal">13</span>
<span class="normal">14</span>
<span class="normal">15</span>
<span class="normal">16</span>
<span class="normal">17</span>
<span class="normal">18</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;servers&quot;</span><span class="p">:</span><span class="w"> </span><span class="o">[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;bms&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;links&quot;</span><span class="p">:</span><span class="w"> </span><span class="o">[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;rel&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;self&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;href&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;https://openstack.example.com/v2.1/c685484a8cc2416b97260938705deb65/servers/820abbd0-2d8b-4bc5-ae46-69cacfd4fbaa&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;rel&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;bookmark&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;href&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;https://openstack.example.com/c685484a8cc2416b97260938705deb65/servers/820abbd0-2d8e-4bc5-ae46-69cacfd4fbaa&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="o">]</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;820abbd0-2d8e-4bc5-ae46-69cacfd4fbaa&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="o">]</span>
<span class="p">}</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0053158693__section7610951"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0053158693__en-us_topic_0106040941_p193201622141412">Normal values
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158693__en-us_topic_0106040941_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0053158693__en-us_topic_0106040941_row10735134615172"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.6.2.1.1.3.1.1"><p id="EN-US_TOPIC_0053158693__en-us_topic_0106040941_p19735204616177">Returned Values</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.6.2.1.1.3.1.2"><p id="EN-US_TOPIC_0053158693__en-us_topic_0106040941_p207355465176">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0053158693__en-us_topic_0106040941_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.6.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0053158693__en-us_topic_0106040941_p13735144611178">200</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.6.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0053158693__en-us_topic_0106040941_p207351246161711">The request has been successfully processed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="EN-US_TOPIC_0053158693__en-us_topic_0106040941_p47633965">For details about other returned values, see <a href="en-us_topic_0053158690.html">Status Codes</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0053158693__section14752650154917"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0053158693__en-us_topic_0106040941_p10243161417491">See <a href="en-us_topic_0107541808.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0053158680.html">BMS Lifecycle Management</a></div>
</div>
</div>