forked from docs/doc-exports
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
392 lines
26 KiB
HTML
392 lines
26 KiB
HTML
<a name="ChangeApiVersionV2"></a><a name="ChangeApiVersionV2"></a>
|
|
|
|
<h1 class="topictitle1">Switching the Version of an API</h1>
|
|
<div id="body992111233217"><div class="section" id="ChangeApiVersionV2__section1692114231428"><h4 class="sectiontitle">Function</h4><p id="ChangeApiVersionV2__p149211623928">This API is used to switch the version of an API. A version is generated based on the current definition of an API when the API is published. The version records the definition and status of the API when it is published.</p>
|
|
<p id="ChangeApiVersionV2__p792218237211">You can switch between multiple versions of an API, but only one version of an API takes effect in the same environment.</p>
|
|
</div>
|
|
<div class="section" id="ChangeApiVersionV2__atuogenerate_1"><h4 class="sectiontitle">Calling Method</h4><p id="ChangeApiVersionV2__p12922723625">For details, see <a href="apig-api-180713003.html">Calling APIs</a>.</p>
|
|
</div>
|
|
<div class="section" id="ChangeApiVersionV2__atuogenerate_2"><h4 class="sectiontitle">URI</h4><p id="ChangeApiVersionV2__p7922192320216">PUT /v2/{project_id}/apigw/instances/{instance_id}/apis/publish/{api_id}</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ChangeApiVersionV2__table139231423720" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="ChangeApiVersionV2__row139227231628"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="ChangeApiVersionV2__p20923132312213">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="ChangeApiVersionV2__p4923182314218">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="ChangeApiVersionV2__p149236231627">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="ChangeApiVersionV2__p18924523920">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ChangeApiVersionV2__row109229231825"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ChangeApiVersionV2__p16924823229">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ChangeApiVersionV2__p16924112313214">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ChangeApiVersionV2__p6924102310211">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ChangeApiVersionV2__p179247231628">Project ID. For details about how to obtain it, see <a href="apig-api-180713009.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row15923152314213"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ChangeApiVersionV2__p209241923628">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ChangeApiVersionV2__p292416231720">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ChangeApiVersionV2__p179251623225">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ChangeApiVersionV2__p159256231820">Gateway ID, which can be obtained from the gateway information on the APIG console.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row89234234210"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="ChangeApiVersionV2__p192513233219">api_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="ChangeApiVersionV2__p19254238218">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="ChangeApiVersionV2__p199269232025">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="ChangeApiVersionV2__p16926112313217">API ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ChangeApiVersionV2__section992652314217"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ChangeApiVersionV2__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="ChangeApiVersionV2__row5926123126"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="ChangeApiVersionV2__p11927823827">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="ChangeApiVersionV2__p179275234218">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="ChangeApiVersionV2__p109274231219">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="ChangeApiVersionV2__p179278237216">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ChangeApiVersionV2__row119264231623"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="ChangeApiVersionV2__p59271523728">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="ChangeApiVersionV2__p139271323223">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="ChangeApiVersionV2__p199271235214">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="ChangeApiVersionV2__p29286231622">User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ChangeApiVersionV2__request_ApiVersion" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="ChangeApiVersionV2__row0928172313218"><th align="left" class="cellrowborder" valign="top" width="19.63%" id="mcps1.3.4.3.2.5.1.1"><p id="ChangeApiVersionV2__p1892842312218">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.369999999999997%" id="mcps1.3.4.3.2.5.1.2"><p id="ChangeApiVersionV2__p1792862320216">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="ChangeApiVersionV2__p89294237216">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="ChangeApiVersionV2__p179291234210">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ChangeApiVersionV2__row149281423421"><td class="cellrowborder" valign="top" width="19.63%" headers="mcps1.3.4.3.2.5.1.1 "><p id="ChangeApiVersionV2__p392915232219">version_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.369999999999997%" headers="mcps1.3.4.3.2.5.1.2 "><p id="ChangeApiVersionV2__p19929162313216">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="ChangeApiVersionV2__p992918231921">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="ChangeApiVersionV2__p15929192315219">API version ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ChangeApiVersionV2__section69301423723"><h4 class="sectiontitle">Response Parameters</h4><p id="ChangeApiVersionV2__p1593015238210"><strong id="ChangeApiVersionV2__b593017233213">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ChangeApiVersionV2__response_PublishResp" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="ChangeApiVersionV2__row19301323926"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="ChangeApiVersionV2__p1593114237212">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="ChangeApiVersionV2__p169318231321">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p id="ChangeApiVersionV2__p1793219231823">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ChangeApiVersionV2__row89309233210"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="ChangeApiVersionV2__p10932623023">publish_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="ChangeApiVersionV2__p7932323420">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="ChangeApiVersionV2__p1593214231620">Publication record ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row12930132317215"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="ChangeApiVersionV2__p1793214237214">api_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="ChangeApiVersionV2__p1393317231923">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="ChangeApiVersionV2__p169331623424">API ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row20930152310218"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="ChangeApiVersionV2__p8933623225">api_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="ChangeApiVersionV2__p119336234215">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="ChangeApiVersionV2__p1893311233219">API name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row199311523424"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="ChangeApiVersionV2__p193372315213">env_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="ChangeApiVersionV2__p293472316212">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="ChangeApiVersionV2__p39347236219">ID of the environment in which the API has been published.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row99311231825"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="ChangeApiVersionV2__p179344232215">remark</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="ChangeApiVersionV2__p9934123327">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="ChangeApiVersionV2__p10934162312213">Description about the publication.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row179313231422"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="ChangeApiVersionV2__p2934623128">publish_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="ChangeApiVersionV2__p493914235214">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="ChangeApiVersionV2__p199408231325">Publication time.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row16931172310210"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="ChangeApiVersionV2__p12940623027">version_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="ChangeApiVersionV2__p994042315218">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="ChangeApiVersionV2__p199404237212">API version currently in use.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="ChangeApiVersionV2__p1294092313220"><strong id="ChangeApiVersionV2__b199404230213">Status code: 400</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ChangeApiVersionV2__response_ErrorMsg" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="ChangeApiVersionV2__row109404232217"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.1"><p id="ChangeApiVersionV2__p794122315214">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.2"><p id="ChangeApiVersionV2__p294113234212">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.5.2.4.1.3"><p id="ChangeApiVersionV2__p16941132315219">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ChangeApiVersionV2__row3940323625"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="ChangeApiVersionV2__p89414231521">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="ChangeApiVersionV2__p1794210231326">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="ChangeApiVersionV2__p194252311210">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row1094182318214"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="ChangeApiVersionV2__p994214231828">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="ChangeApiVersionV2__p15942172314211">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="ChangeApiVersionV2__p99421923323">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="ChangeApiVersionV2__p19428232210"><strong id="ChangeApiVersionV2__b4942023724">Status code: 401</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ChangeApiVersionV2__response_ErrorMsg_1" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="ChangeApiVersionV2__row1194392315215"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.1"><p id="ChangeApiVersionV2__p20943823824">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.2"><p id="ChangeApiVersionV2__p17943102315210">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.7.2.4.1.3"><p id="ChangeApiVersionV2__p119436231523">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ChangeApiVersionV2__row594311233218"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="ChangeApiVersionV2__p2094492312214">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="ChangeApiVersionV2__p1394482319211">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="ChangeApiVersionV2__p694414232218">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row1494362319219"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="ChangeApiVersionV2__p39440232220">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="ChangeApiVersionV2__p1994414238214">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="ChangeApiVersionV2__p1394412231622">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="ChangeApiVersionV2__p79441323022"><strong id="ChangeApiVersionV2__b189449231226">Status code: 403</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ChangeApiVersionV2__response_ErrorMsg_2" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Response body parameters</caption><thead align="left"><tr id="ChangeApiVersionV2__row1094517234217"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.9.2.4.1.1"><p id="ChangeApiVersionV2__p11945162311219">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.9.2.4.1.2"><p id="ChangeApiVersionV2__p109459235215">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.9.2.4.1.3"><p id="ChangeApiVersionV2__p19451023026">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ChangeApiVersionV2__row129455235216"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="ChangeApiVersionV2__p189456234213">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="ChangeApiVersionV2__p29464230217">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="ChangeApiVersionV2__p29461023127">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row1894532320219"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="ChangeApiVersionV2__p694613231223">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="ChangeApiVersionV2__p1194617238215">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="ChangeApiVersionV2__p1094611233214">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="ChangeApiVersionV2__p394612234214"><strong id="ChangeApiVersionV2__b1946523123">Status code: 404</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ChangeApiVersionV2__response_ErrorMsg_3" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="ChangeApiVersionV2__row15946623022"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.11.2.4.1.1"><p id="ChangeApiVersionV2__p594719231629">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.11.2.4.1.2"><p id="ChangeApiVersionV2__p894732316220">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.11.2.4.1.3"><p id="ChangeApiVersionV2__p09471623325">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ChangeApiVersionV2__row494720232218"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.1 "><p id="ChangeApiVersionV2__p694712231226">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.2 "><p id="ChangeApiVersionV2__p189481723529">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.11.2.4.1.3 "><p id="ChangeApiVersionV2__p594816231326">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row39476231521"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.1 "><p id="ChangeApiVersionV2__p1394842311210">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.2 "><p id="ChangeApiVersionV2__p59481823525">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.11.2.4.1.3 "><p id="ChangeApiVersionV2__p129483235210">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="ChangeApiVersionV2__p8948423829"><strong id="ChangeApiVersionV2__b1394813230215">Status code: 500</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ChangeApiVersionV2__response_ErrorMsg_4" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameters</caption><thead align="left"><tr id="ChangeApiVersionV2__row16949102311220"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.13.2.4.1.1"><p id="ChangeApiVersionV2__p15949102313214">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.13.2.4.1.2"><p id="ChangeApiVersionV2__p17949823820">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.13.2.4.1.3"><p id="ChangeApiVersionV2__p1995092320214">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ChangeApiVersionV2__row15949823421"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.13.2.4.1.1 "><p id="ChangeApiVersionV2__p1495082310214">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.13.2.4.1.2 "><p id="ChangeApiVersionV2__p1195012231021">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.13.2.4.1.3 "><p id="ChangeApiVersionV2__p99509231923">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row149496239212"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.13.2.4.1.1 "><p id="ChangeApiVersionV2__p14950223129">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.13.2.4.1.2 "><p id="ChangeApiVersionV2__p199503231825">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.13.2.4.1.3 "><p id="ChangeApiVersionV2__p1795062317214">Error message.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ChangeApiVersionV2__section3951223926"><h4 class="sectiontitle">Example Requests</h4><p id="ChangeApiVersionV2__p18951132313217">Switching an API to a specified version</p>
|
|
<pre class="screen" id="ChangeApiVersionV2__screen18951102319218">{
|
|
"version_id" : "ee1a5a38d3d3493abf1dc4ed6cacfa0b"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ChangeApiVersionV2__section129514234216"><h4 class="sectiontitle">Example Responses</h4><p id="ChangeApiVersionV2__p1195152319214"><strong id="ChangeApiVersionV2__b1795113234217">Status code: 200</strong></p>
|
|
<p id="ChangeApiVersionV2__p795118230212">OK</p>
|
|
<pre class="screen" id="ChangeApiVersionV2__screen119521923829">{
|
|
"publish_id" : "9191cdb430724d4b8586ed7f1b962ca2",
|
|
"api_id" : "5f918d104dc84480a75166ba99efff21",
|
|
"env_id" : "DEFAULT_ENVIRONMENT_RELEASE_ID",
|
|
"version_id" : "ee1a5a38d3d3493abf1dc4ed6cacfa0b",
|
|
"publish_time" : "2020-08-03T03:27:49.483295655Z"
|
|
}</pre>
|
|
<p id="ChangeApiVersionV2__p295252317217"><strong id="ChangeApiVersionV2__b2095282314213">Status code: 400</strong></p>
|
|
<p id="ChangeApiVersionV2__p9952122319216">Bad Request</p>
|
|
<pre class="screen" id="ChangeApiVersionV2__screen149525232217">{
|
|
"error_code" : "APIG.2000",
|
|
"error_msg" : "Parameter error: Serialization error: unexpected end of JSON input"
|
|
}</pre>
|
|
<p id="ChangeApiVersionV2__p109535231626"><strong id="ChangeApiVersionV2__b1095319239218">Status code: 401</strong></p>
|
|
<p id="ChangeApiVersionV2__p1495311231726">Unauthorized</p>
|
|
<pre class="screen" id="ChangeApiVersionV2__screen159531623226">{
|
|
"error_code" : "APIG.1002",
|
|
"error_msg" : "Incorrect token or token resolution failed"
|
|
}</pre>
|
|
<p id="ChangeApiVersionV2__p29531923222"><strong id="ChangeApiVersionV2__b169531823829">Status code: 403</strong></p>
|
|
<p id="ChangeApiVersionV2__p1395312234214">Forbidden</p>
|
|
<pre class="screen" id="ChangeApiVersionV2__screen1095415237212">{
|
|
"error_code" : "APIG.1005",
|
|
"error_msg" : "No permissions to request this method"
|
|
}</pre>
|
|
<p id="ChangeApiVersionV2__p19542231824"><strong id="ChangeApiVersionV2__b149542231321">Status code: 404</strong></p>
|
|
<p id="ChangeApiVersionV2__p7954172318210">Not Found</p>
|
|
<pre class="screen" id="ChangeApiVersionV2__screen1695492318210">{
|
|
"error_code" : "APIG.3022",
|
|
"error_msg" : "The API version does not exist,id:ee1a5a38d3d3493abf1dc4ed6cacfa0b"
|
|
}</pre>
|
|
<p id="ChangeApiVersionV2__p69551233212"><strong id="ChangeApiVersionV2__b39554239215">Status code: 500</strong></p>
|
|
<p id="ChangeApiVersionV2__p1295516235218">Internal Server Error</p>
|
|
<pre class="screen" id="ChangeApiVersionV2__screen595542319219">{
|
|
"error_code" : "APIG.9999",
|
|
"error_msg" : "System error"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ChangeApiVersionV2__section4955323420"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ChangeApiVersionV2__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="ChangeApiVersionV2__row129561423722"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="ChangeApiVersionV2__p1095612231427">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="ChangeApiVersionV2__p69562232026">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ChangeApiVersionV2__row159569236212"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="ChangeApiVersionV2__p1695714231821">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="ChangeApiVersionV2__p19957423625">OK</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row1095619232215"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="ChangeApiVersionV2__p159574231024">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="ChangeApiVersionV2__p149573231328">Bad Request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row395622315214"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="ChangeApiVersionV2__p9957523828">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="ChangeApiVersionV2__p1395702312210">Unauthorized</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row2095617231322"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="ChangeApiVersionV2__p1895752312215">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="ChangeApiVersionV2__p4957423421">Forbidden</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row19565231322"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="ChangeApiVersionV2__p6958323823">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="ChangeApiVersionV2__p2958182317211">Not Found</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ChangeApiVersionV2__row139567232023"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="ChangeApiVersionV2__p495815234219">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="ChangeApiVersionV2__p119587231624">Internal Server Error</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ChangeApiVersionV2__section13958102318212"><h4 class="sectiontitle">Error Codes</h4><p id="ChangeApiVersionV2__p09584231226">See <a href="ErrorCode.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="ApiManagement.html">API Management</a></div>
|
|
</div>
|
|
</div>
|
|
|