forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com> Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
201 lines
16 KiB
HTML
201 lines
16 KiB
HTML
<a name="EN-US_TOPIC_0170918588"></a><a name="EN-US_TOPIC_0170918588"></a>
|
|
|
|
<h1 class="topictitle1">Querying an API Version (Native OpenStack API)</h1>
|
|
<div id="body1558493108708"><div class="section" id="EN-US_TOPIC_0170918588__section18441284152049"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0170918588__p53961015112016">This API is used to query a specified API version, such as version compatibility and domain name information of an API.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0170918588__section21923693152049"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0170918588__p828941121519">GET /{api_version}</p>
|
|
<p id="EN-US_TOPIC_0170918588__p1569719614469"><a href="#EN-US_TOPIC_0170918588__table6209770492526">Table 1</a> lists the parameters in the URI.</p>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0170918588__table6209770492526"></a><a name="table6209770492526"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0170918588__table6209770492526" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0170918588__row4392035892526"><th align="left" class="cellrowborder" valign="top" width="19.74%" id="mcps1.3.2.4.2.5.1.1"><p id="EN-US_TOPIC_0170918588__p77928492526">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.73%" id="mcps1.3.2.4.2.5.1.2"><p id="EN-US_TOPIC_0170918588__p6312205492526">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.919999999999998%" id="mcps1.3.2.4.2.5.1.3"><p id="EN-US_TOPIC_0170918588__p1261277392526">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40.61%" id="mcps1.3.2.4.2.5.1.4"><p id="EN-US_TOPIC_0170918588__p1500168892526">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0170918588__row717722492526"><td class="cellrowborder" valign="top" width="19.74%" headers="mcps1.3.2.4.2.5.1.1 "><p id="EN-US_TOPIC_0170918588__p4448425292526">api_version</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.73%" headers="mcps1.3.2.4.2.5.1.2 "><p id="EN-US_TOPIC_0170918588__p4645465392526">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.919999999999998%" headers="mcps1.3.2.4.2.5.1.3 "><p id="EN-US_TOPIC_0170918588__p473051492526">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.61%" headers="mcps1.3.2.4.2.5.1.4 "><p id="EN-US_TOPIC_0170918588__p4762733192526">Specifies the API version, for example v2.0.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0170918588__section62484847152049"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0170918588__p371913157576">Request parameters</p>
|
|
<p id="EN-US_TOPIC_0170918588__p286012216461">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0170918588__section2083010507719"><h4 class="sectiontitle">Example Request</h4><p id="EN-US_TOPIC_0170918588__p1846708579">Querying an API version</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0170918588__screen141521055274">GET https://{Endpoint}/v2.0</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0170918588__section47461859152049"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0170918588__ul1977119206179"><li id="EN-US_TOPIC_0170918588__li5771020141710">Response parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0170918588__table38630935152049" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0170918588__row1849976152049"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.2.1.1.1.4.1.1"><p id="EN-US_TOPIC_0170918588__p15630386152049">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.2.1.1.1.4.1.2"><p id="EN-US_TOPIC_0170918588__p58101744152049">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.2.1.1.1.4.1.3"><p id="EN-US_TOPIC_0170918588__p27198362152049">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0170918588__row55583702152049"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0170918588__p5985974152049">versions</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0170918588__p15101858152049">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0170918588__p30612417152049">Specifies the version.</p>
|
|
<p id="EN-US_TOPIC_0170918588__p1025574924719">For details, see <a href="#EN-US_TOPIC_0170918588__table854484962011">Table 2</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0170918588__table854484962011"></a><a name="table854484962011"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0170918588__table854484962011" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Data structure description of the versions field</caption><thead align="left"><tr id="EN-US_TOPIC_0170918588__row454414499200"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.2.1.2.2.4.1.1"><p id="EN-US_TOPIC_0170918588__p15544144932017">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.2.1.2.2.4.1.2"><p id="EN-US_TOPIC_0170918588__p1354414918206">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.2.1.2.2.4.1.3"><p id="EN-US_TOPIC_0170918588__p175441049112011">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0170918588__row3544134915207"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0170918588__p554412490205">status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0170918588__p13544154992013">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0170918588__p13544549172014">Specifies the API status.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0170918588__row1654434982010"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0170918588__p7544144912017">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0170918588__p7544849202011">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0170918588__p854474942018">Specifies the API ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0170918588__row13545134914208"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0170918588__p85451494204">links</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0170918588__p11545184910208">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0170918588__p454514493203">Specifies the description.</p>
|
|
<p id="EN-US_TOPIC_0170918588__p1381418418482">For details, see <a href="#EN-US_TOPIC_0170918588__table9477147162314">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0170918588__table9477147162314"></a><a name="table9477147162314"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0170918588__table9477147162314" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Data structure description of the versions.links field</caption><thead align="left"><tr id="EN-US_TOPIC_0170918588__row147754713235"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.2.1.3.2.4.1.1"><p id="EN-US_TOPIC_0170918588__p147713470235">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.2.1.3.2.4.1.2"><p id="EN-US_TOPIC_0170918588__p1847764752313">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.2.1.3.2.4.1.3"><p id="EN-US_TOPIC_0170918588__p647724711236">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0170918588__row15478104772314"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0170918588__p10478114720236">href</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0170918588__p2478104702312">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><p id="EN-US_TOPIC_0170918588__p1547818479233">Specifies the domain name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0170918588__row181111958142415"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0170918588__p1911295882410">rel</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0170918588__p211211580241">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><p id="EN-US_TOPIC_0170918588__p4112758122414">Specifies the domain name description.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0170918588__li16770825171717">Example response<pre class="codeblock" id="EN-US_TOPIC_0170918588__codeblock6641838292551">STATUS CODE 300</pre>
|
|
<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0170918588__screen954715489428"><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></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"versions"</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">"status"</span><span class="p">:</span><span class="w"> </span><span class="s">"SUPPORTED"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"id"</span><span class="p">:</span><span class="w"> </span><span class="s">"v2.0"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"links"</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">"href"</span><span class="p">:</span><span class="w"> </span><span class="s">"https://image.az1.dc1.domainname.com/v2/"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"rel"</span><span class="p">:</span><span class="w"> </span><span class="s">"self"</span>
|
|
<span class="w"> </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="o">]</span>
|
|
<span class="p">}</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0170918588__section37588986152049"><h4 class="sectiontitle">Returned Values</h4><ul id="EN-US_TOPIC_0170918588__ul31470215"><li id="EN-US_TOPIC_0170918588__li14796483">Normal<p id="EN-US_TOPIC_0170918588__p66059488"><a name="EN-US_TOPIC_0170918588__li14796483"></a><a name="li14796483"></a>300</p>
|
|
</li><li id="EN-US_TOPIC_0170918588__li57664488">Abnormal
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0170918588__table271454817439" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0170918588__row3541095017439"><th align="left" class="cellrowborder" valign="top" width="46.54%" id="mcps1.3.6.2.2.1.1.3.1.1"><p id="EN-US_TOPIC_0170918588__p4971469317439">Returned Values</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.459999999999994%" id="mcps1.3.6.2.2.1.1.3.1.2"><p id="EN-US_TOPIC_0170918588__p35835717439">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0170918588__row2902697417439"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0170918588__p237466317439">400 Bad Request</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0170918588__p5812997617439">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0170918588__row5340773917439"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0170918588__p3105962817439">401 Unauthorized</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0170918588__p3280197817439">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0170918588__row2678235117439"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0170918588__p2188683517439">403 Forbidden</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0170918588__p2800317417439">You do not have the rights to perform the operation.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0170918588__row16775501191954"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0170918588__p19013873191957">404 Not Found</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0170918588__p63728762191957">The requested resource was not found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0170918588__row5070198217439"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0170918588__p1321988617439">500 Internal Server Error</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0170918588__p6417782617439">Internal service error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0170918588__row4072952517439"><td class="cellrowborder" valign="top" width="46.54%" headers="mcps1.3.6.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0170918588__p1075724317439">503 Service Unavailable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.459999999999994%" headers="mcps1.3.6.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0170918588__p6603036117439">The service is unavailable.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0170918587.html">API Version Query (Native OpenStack API)</a></div>
|
|
</div>
|
|
</div>
|
|
|