doc-exports/docs/bms/api-ref/en-us_topic_0134720583.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

195 lines
16 KiB
HTML

<a name="EN-US_TOPIC_0134720583"></a><a name="EN-US_TOPIC_0134720583"></a>
<h1 class="topictitle1">Querying an API Version (Native OpenStack API)</h1>
<div id="body1539316607899"><div class="section" id="EN-US_TOPIC_0134720583__section553655182144"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0134720583__p45724818">This API is used to query a specified API version.</p>
</div>
<div class="section" id="EN-US_TOPIC_0134720583__section961608182144"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0134720583__p53736847103512">GET /{api_version}</p>
<p id="EN-US_TOPIC_0134720583__p0429188153416"><a href="#EN-US_TOPIC_0134720583__table4181222133410">Table 1</a> lists the parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0134720583__table4181222133410"></a><a name="table4181222133410"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0134720583__table4181222133410" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0134720583__row18182142233415"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.1"><p id="EN-US_TOPIC_0134720583__p5187119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.2"><p id="EN-US_TOPIC_0134720583__p17503500">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.3"><p id="EN-US_TOPIC_0134720583__p8497414">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0134720583__row418218222340"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0134720583__p51178607">api_version</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0134720583__p51826478">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0134720583__p37195178">Specifies the API version, for example v2.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0134720583__section19667838182144"><h4 class="sectiontitle">Request Message</h4><ul id="EN-US_TOPIC_0134720583__ul10182144118413"><li id="EN-US_TOPIC_0134720583__li161591126194817">Request parameters<p id="EN-US_TOPIC_0134720583__p8889142964818"><a name="EN-US_TOPIC_0134720583__li161591126194817"></a><a name="li161591126194817"></a>None</p>
</li><li id="EN-US_TOPIC_0134720583__li13182141646">Example request<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0134720583__screen522571718520"><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</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0134720583__section43666554182144"><h4 class="sectiontitle">Response Message</h4><ul id="EN-US_TOPIC_0134720583__ul2884827355"><li id="EN-US_TOPIC_0134720583__li589912359579">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0134720583__table26246518152631" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0134720583__row29602547152631"><th align="left" class="cellrowborder" valign="top" width="23.13%" id="mcps1.3.4.2.1.1.1.4.1.1"><p id="EN-US_TOPIC_0134720583__p1143665616354">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.34%" id="mcps1.3.4.2.1.1.1.4.1.2"><p id="EN-US_TOPIC_0134720583__p11440156143517">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.53%" id="mcps1.3.4.2.1.1.1.4.1.3"><p id="EN-US_TOPIC_0134720583__p244212561357">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0134720583__row56174697152631"><td class="cellrowborder" valign="top" width="23.13%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0134720583__p4445556153516">version</p>
</td>
<td class="cellrowborder" valign="top" width="22.34%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0134720583__p444855610353">Object</p>
</td>
<td class="cellrowborder" valign="top" width="54.53%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0134720583__p344911569354">Specifies a specified version.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0134720583__row4615503152631"><td class="cellrowborder" valign="top" width="23.13%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0134720583__p8452756123518">id</p>
</td>
<td class="cellrowborder" valign="top" width="22.34%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0134720583__p1445545663515">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.53%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0134720583__p045585620357">Specifies the version ID, for example, v1.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0134720583__row9239644152631"><td class="cellrowborder" valign="top" width="23.13%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0134720583__p9460175653518">links</p>
</td>
<td class="cellrowborder" valign="top" width="22.34%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0134720583__p346325618353">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="54.53%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0134720583__p746525619351">Specifies the API URL.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0134720583__row419672501413"><td class="cellrowborder" valign="top" width="23.13%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0134720583__p16283354130">href</p>
</td>
<td class="cellrowborder" valign="top" width="22.34%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0134720583__p13242332181317">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.53%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0134720583__p2269104581219">Specifies the reference address of the current API version.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0134720583__row154810286148"><td class="cellrowborder" valign="top" width="23.13%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0134720583__p2139956101218">rel</p>
</td>
<td class="cellrowborder" valign="top" width="22.34%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0134720583__p824653211138">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.53%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0134720583__p513917563125">Specifies the relationship between the current API version and the referenced address.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0134720583__row12929787152631"><td class="cellrowborder" valign="top" width="23.13%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0134720583__p13468556113518">version</p>
</td>
<td class="cellrowborder" valign="top" width="22.34%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0134720583__p18472756113513">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.53%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0134720583__p11474856173511">If the APIs of this version support minor versions, set this parameter to the maximum minor version supported. If not, leave this parameter blank.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0134720583__row39341340152631"><td class="cellrowborder" valign="top" width="23.13%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0134720583__p647516561358">status</p>
</td>
<td class="cellrowborder" valign="top" width="22.34%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0134720583__p164801756103517">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.53%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0134720583__p104811756113517">Specifies the version status. Possible values are as follows:</p>
<ul id="EN-US_TOPIC_0134720583__ul257315312597"><li id="EN-US_TOPIC_0134720583__en-us_topic_0134720582_li12932185315532"><strong id="EN-US_TOPIC_0134720583__en-us_topic_0134720582_b11954152420422">CURRENT</strong>: indicates a primary version.</li><li id="EN-US_TOPIC_0134720583__en-us_topic_0134720582_li4932115355313"><strong id="EN-US_TOPIC_0134720583__en-us_topic_0134720582_b3117229104215">SUPPORTED</strong>: indicates an old version that is still supported.</li><li id="EN-US_TOPIC_0134720583__en-us_topic_0134720582_li7932125320534"><strong id="EN-US_TOPIC_0134720583__en-us_topic_0134720582_b449312382428">DEPRECATED</strong>: indicates a deprecated version which may be deleted later.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0134720583__row398200152631"><td class="cellrowborder" valign="top" width="23.13%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0134720583__p7486145617358">updated</p>
</td>
<td class="cellrowborder" valign="top" width="22.34%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0134720583__p34901556173518">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.53%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0134720583__p83161712111">Specifies the version release time, which must be the UTC time.</p>
<p id="EN-US_TOPIC_0134720583__p24932056163517">For example, the release time of v1 is 2014-06-28T12:20:21Z.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0134720583__row61549520152631"><td class="cellrowborder" valign="top" width="23.13%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0134720583__p2495115693510">min_version</p>
</td>
<td class="cellrowborder" valign="top" width="22.34%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0134720583__p134991256203512">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.53%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0134720583__p205014565351">If the APIs of this version support minor versions, set this parameter to the supported minimum minor version. If not, leave this parameter blank.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0134720583__li18884327552">Example response<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0134720583__screen22133839182240"><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>
<span class="normal">19</span>
<span class="normal">20</span>
<span class="normal">21</span>
<span class="normal">22</span>
<span class="normal">23</span>
<span class="normal">24</span>
<span class="normal">25</span>
<span class="normal">26</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;version&quot;</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="s">&quot;min_version&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;media-types&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;type&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;application/vnd.openstack.compute+json;version=2&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;base&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;application/json&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;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://ecs.service.domain.com:443/v2/&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;describedby&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;http://docs.openstack.org/&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;type&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;text/html&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;v2.0&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;updated&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;1999-02-20T11:33:21Z&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;version&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s">&quot;status&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;SUPPORTED&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0134720583__section7610951"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0134720583__en-us_topic_0106040941_p193201622141412">Normal values
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0134720583__en-us_topic_0106040941_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0134720583__en-us_topic_0106040941_row10735134615172"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.5.2.1.1.3.1.1"><p id="EN-US_TOPIC_0134720583__en-us_topic_0106040941_p19735204616177">Returned Values</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.5.2.1.1.3.1.2"><p id="EN-US_TOPIC_0134720583__en-us_topic_0106040941_p207355465176">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0134720583__en-us_topic_0106040941_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0134720583__en-us_topic_0106040941_p13735144611178">200</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0134720583__en-us_topic_0106040941_p207351246161711">The request has been successfully processed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="EN-US_TOPIC_0134720583__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_0134720583__section14752650154917"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0134720583__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_0134720581.html">API Version Query</a></div>
</div>
</div>