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

199 lines
17 KiB
HTML

<a name="EN-US_TOPIC_0132973805"></a><a name="EN-US_TOPIC_0132973805"></a>
<h1 class="topictitle1">Querying an API Version</h1>
<div id="body1537927742000"><div class="section" id="EN-US_TOPIC_0132973805__section553655182144"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0132973805__p45724818">This API is used to query a specified API version of the <span id="EN-US_TOPIC_0132973805__text653545417216">BMS</span><span id="EN-US_TOPIC_0132973805__text37679597211"></span> service.</p>
</div>
<div class="section" id="EN-US_TOPIC_0132973805__section961608182144"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0132973805__p53736847103512">GET /{api_version}</p>
<div class="p" id="EN-US_TOPIC_0132973805__p7916494270"><a href="#EN-US_TOPIC_0132973805__table46110007">Table 1</a> lists the parameters.
<div class="tablenoborder"><a name="EN-US_TOPIC_0132973805__table46110007"></a><a name="table46110007"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0132973805__table46110007" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0132973805__row14148614"><th align="left" class="cellrowborder" valign="top" width="20.74%" id="mcps1.3.2.3.2.2.4.1.1"><p id="EN-US_TOPIC_0132973805__p5187119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.99%" id="mcps1.3.2.3.2.2.4.1.2"><p id="EN-US_TOPIC_0132973805__p17503500">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59.27%" id="mcps1.3.2.3.2.2.4.1.3"><p id="EN-US_TOPIC_0132973805__p8497414">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0132973805__row17201924"><td class="cellrowborder" valign="top" width="20.74%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0132973805__p51178607">api_version</p>
</td>
<td class="cellrowborder" valign="top" width="19.99%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0132973805__p51826478">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="59.27%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0132973805__p37195178">Specifies the API version, for example, v1.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0132973805__section19667838182144"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0132973805__ul19118191384015"><li id="EN-US_TOPIC_0132973805__li8916537233">Request parameters<p id="EN-US_TOPIC_0132973805__p147400574234"><a name="EN-US_TOPIC_0132973805__li8916537233"></a><a name="li8916537233"></a>None</p>
</li><li id="EN-US_TOPIC_0132973805__li1911811315406">Example request<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0132973805__screen193862718421"><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">//{BMS Endpoint}/v1</span>
</pre></div></td></tr></table></div>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0132973805__section43666554182144"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0132973805__ul59560431"><li id="EN-US_TOPIC_0132973805__li66281838">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0132973805__table59665636" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0132973805__row28755990"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.1.1.4.1.1"><p id="EN-US_TOPIC_0132973805__p47533853">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.1.1.4.1.2"><p id="EN-US_TOPIC_0132973805__p25036876">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.1.1.4.1.3"><p id="EN-US_TOPIC_0132973805__p14721100">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0132973805__row34736162"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0132973805__p1654215818362">version</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0132973805__p2257160">Object</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0132973805__p48612303">Specifies a specified API version of the <span id="EN-US_TOPIC_0132973805__text146131017226">BMS</span><span id="EN-US_TOPIC_0132973805__text4175181511229"></span> service. For details, see <a href="#EN-US_TOPIC_0132973805__table786171513527">Table 2</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0132973805__table786171513527"></a><a name="table786171513527"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0132973805__table786171513527" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="EN-US_TOPIC_0132973805__b2092618566423">version</strong> field data structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0132973805__row16870715205219"><th align="left" class="cellrowborder" valign="top" width="26.75%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="EN-US_TOPIC_0132973805__p787314157521">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.3%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="EN-US_TOPIC_0132973805__p15875415185216">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.949999999999996%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="EN-US_TOPIC_0132973805__p1487831516528">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0132973805__row1288051545213"><td class="cellrowborder" valign="top" width="26.75%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0132973805__p198824151526">id</p>
</td>
<td class="cellrowborder" valign="top" width="18.3%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0132973805__p4884915105217">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.949999999999996%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0132973805__p088519150526">Specifies the API version ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0132973805__row8887191525212"><td class="cellrowborder" valign="top" width="26.75%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0132973805__p9888151505213">links</p>
</td>
<td class="cellrowborder" valign="top" width="18.3%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0132973805__p1489112150526">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="54.949999999999996%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0132973805__p1894161514527">Specifies the API URL. For details, see <a href="#EN-US_TOPIC_0132973805__t759e6d15d244474e8f286185ede143fb">Table 3</a>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0132973805__row20895111565214"><td class="cellrowborder" valign="top" width="26.75%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0132973805__p9107111411399">min_version</p>
</td>
<td class="cellrowborder" valign="top" width="18.3%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0132973805__p58981015115218">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.949999999999996%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0132973805__p19907734114018">Specifies the earliest micro API version that is supported.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0132973805__row9901141525214"><td class="cellrowborder" valign="top" width="26.75%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0132973805__p3903415185215">status</p>
</td>
<td class="cellrowborder" valign="top" width="18.3%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0132973805__p390610159525">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.949999999999996%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0132973805__p4907191535213">Specifies the API version status.</p>
<ul id="EN-US_TOPIC_0132973805__ul19909615185218"><li id="EN-US_TOPIC_0132973805__li19091315135217"><strong id="EN-US_TOPIC_0132973805__b88922210436">CURRENT</strong>: indicates a primary version.</li><li id="EN-US_TOPIC_0132973805__li1291211513524"><strong id="EN-US_TOPIC_0132973805__b11371724164314">SUPPORTED</strong>: indicates an earlier version that is still supported.</li><li id="EN-US_TOPIC_0132973805__li209133153523"><strong id="EN-US_TOPIC_0132973805__b20573132514316">DEPRECATED</strong>: indicates a deprecated version that may be deleted later.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0132973805__row149151915105212"><td class="cellrowborder" valign="top" width="26.75%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0132973805__p4918715155215">updated</p>
</td>
<td class="cellrowborder" valign="top" width="18.3%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0132973805__p892011518520">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.949999999999996%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0132973805__p1255911034615">Specifies the release date of an API version.</p>
<p id="EN-US_TOPIC_0132973805__p19899173431114">The timestamp format is YYYY-MM-DDTHH:MM:SSZ (ISO 8601), for example, 2018-09-30T00:00:00Z.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0132973805__row17923151519525"><td class="cellrowborder" valign="top" width="26.75%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0132973805__p1892416155523">version</p>
</td>
<td class="cellrowborder" valign="top" width="18.3%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0132973805__p16926191511523">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.949999999999996%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0132973805__p12928215185216">Specifies the latest micro API version that is supported.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0132973805__t759e6d15d244474e8f286185ede143fb"></a><a name="t759e6d15d244474e8f286185ede143fb"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0132973805__t759e6d15d244474e8f286185ede143fb" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0132973805__b3805932114311">links</strong> field data structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0132973805__rce98b9668cd747c88039421afe5ce935"><th align="left" class="cellrowborder" valign="top" width="26.57%" id="mcps1.3.4.2.1.3.2.4.1.1"><p id="EN-US_TOPIC_0132973805__ad9ac3007570a4752b2b2dbc0fb04dadc">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.3%" id="mcps1.3.4.2.1.3.2.4.1.2"><p id="EN-US_TOPIC_0132973805__a602246198adf4a79a13bc4317d4c0d4f">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.13%" id="mcps1.3.4.2.1.3.2.4.1.3"><p id="EN-US_TOPIC_0132973805__a8cbfa8dcb0b943ff8e789755123fec83">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0132973805__r43de461181294c56b28da56a1f604b09"><td class="cellrowborder" valign="top" width="26.57%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0132973805__abc19a41a8f594f1ba6701e10da50a078">href</p>
</td>
<td class="cellrowborder" valign="top" width="18.3%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0132973805__a15ae7b8585d24e48abc6b9bf45636fda">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.13%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="EN-US_TOPIC_0132973805__p139393206480">Specifies the API URL.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0132973805__rbd5ec7242fef4c03b21636ac14160d9e"><td class="cellrowborder" valign="top" width="26.57%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0132973805__a18479f6b70b34f29b2b90d754f59282a">rel</p>
</td>
<td class="cellrowborder" valign="top" width="18.3%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0132973805__ae1f14fa2e6a54531aeffd26874fea267">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.13%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="EN-US_TOPIC_0132973805__p115877381483">Specifies the API URL dependency. The value can be:</p>
<ul id="EN-US_TOPIC_0132973805__ul207311644172510"><li id="EN-US_TOPIC_0132973805__en-us_topic_0131326852_li1013032685313"><strong id="EN-US_TOPIC_0132973805__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_0132973805__en-us_topic_0131326852_li14448163219533"><strong id="EN-US_TOPIC_0132973805__en-us_topic_0131326852_b84171947711">bookmark</strong>: resource link that can be stored for a long time.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="EN-US_TOPIC_0132973805__ul53865284402"><li id="EN-US_TOPIC_0132973805__li203864282401">Example response<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0132973805__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></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;id&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;v1&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;href&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;http://bms.xxx.com/v1/&quot;</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="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;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;status&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;CURRENT&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;2018-09-30T00:00:00Z&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="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_0132973805__section12571834"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0132973805__en-us_topic_0132973804_p193201622141412">Normal values
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0132973805__en-us_topic_0132973804_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0132973805__en-us_topic_0132973804_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_0132973805__en-us_topic_0132973804_p19735204616177">Return Value</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_0132973805__en-us_topic_0132973804_p207355465176">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0132973805__en-us_topic_0132973804_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0132973805__en-us_topic_0132973804_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_0132973805__en-us_topic_0132973804_p207351246161711">The request has been successfully processed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="EN-US_TOPIC_0132973805__en-us_topic_0132973804_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_0132973805__section12157147171520"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0132973805__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_0132973615.html">API Version Query</a></div>
</div>
</div>