Files
doc-exports/docs/apig/api-ref/CreateEnvironmentV2.html
chenjunjie c18df8d8fe APIG API 20241218 version
Reviewed-by: Ziuzko, Stanislav <stanislav.ziuzko@t-systems.com>
Co-authored-by: chenjunjie <chenjunjie@huawei.com>
Co-committed-by: chenjunjie <chenjunjie@huawei.com>
2025-03-27 13:05:54 +00:00

337 lines
23 KiB
HTML

<a name="CreateEnvironmentV2"></a><a name="CreateEnvironmentV2"></a>
<h1 class="topictitle1">Creating an Environment</h1>
<div id="body1533318115484"><div class="section" id="CreateEnvironmentV2__section933317184811"><h4 class="sectiontitle">Function</h4><p id="CreateEnvironmentV2__p83331118482">API providers can publish an API in different environments, such as the development, test, and production environments</p>
<p id="CreateEnvironmentV2__p113331219489">API information, such as the version, request address, and even request message, varies depending on the environment in which an API is published. For example, v1.0 of an API is published in the production environment, v1.1 in the test environment, and v1.2 in the development environment.</p>
<p id="CreateEnvironmentV2__p633319119481">APIG provides environment management, enabling you to access APIG in different scenarios at minimal costs.</p>
</div>
<div class="section" id="CreateEnvironmentV2__atuogenerate_1"><h4 class="sectiontitle">Calling Method</h4><p id="CreateEnvironmentV2__p43341313484">For details, see <a href="apig-api-180713003.html">Calling APIs</a>.</p>
</div>
<div class="section" id="CreateEnvironmentV2__atuogenerate_2"><h4 class="sectiontitle">URI</h4><p id="CreateEnvironmentV2__p63342184814">POST /v2/{project_id}/apigw/instances/{instance_id}/envs</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEnvironmentV2__table15335151104811" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="CreateEnvironmentV2__row2033420113485"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="CreateEnvironmentV2__p143354154811">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="CreateEnvironmentV2__p1633518164810">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="CreateEnvironmentV2__p1833691194810">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="CreateEnvironmentV2__p15336181164817">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEnvironmentV2__row933451164818"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateEnvironmentV2__p133361416485">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateEnvironmentV2__p93371815481">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateEnvironmentV2__p1833710124819">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateEnvironmentV2__p533718119484">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="CreateEnvironmentV2__row33341014487"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateEnvironmentV2__p5338141144817">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateEnvironmentV2__p533851194819">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateEnvironmentV2__p1833891144819">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateEnvironmentV2__p33389144812">Gateway ID, which can be obtained from the gateway information on the APIG console.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateEnvironmentV2__section333841154812"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEnvironmentV2__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="CreateEnvironmentV2__row1433951164819"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="CreateEnvironmentV2__p1733917115482">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="CreateEnvironmentV2__p73397117488">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="CreateEnvironmentV2__p434081154812">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="CreateEnvironmentV2__p153409194820">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEnvironmentV2__row1133951124814"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="CreateEnvironmentV2__p1340111114813">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="CreateEnvironmentV2__p834010154816">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="CreateEnvironmentV2__p6340181194818">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="CreateEnvironmentV2__p173402111482">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="CreateEnvironmentV2__request_EnvCreate" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="CreateEnvironmentV2__row83413112485"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="CreateEnvironmentV2__p13342101174811">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="CreateEnvironmentV2__p1134231154814">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="CreateEnvironmentV2__p934215154812">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="CreateEnvironmentV2__p12343017481">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEnvironmentV2__row153415116480"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="CreateEnvironmentV2__p734310104820">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="CreateEnvironmentV2__p93431219482">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="CreateEnvironmentV2__p834412174810">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="CreateEnvironmentV2__p16344151194818">Environment name, which can contain letters, digits, and underscores (_) and must start with a letter.</p>
<p id="CreateEnvironmentV2__p1334417110487">Minimum: <strong id="CreateEnvironmentV2__b163448116488">3</strong></p>
<p id="CreateEnvironmentV2__p17344101144811">Maximum: <strong id="CreateEnvironmentV2__b1834414134814">64</strong></p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row103414144814"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="CreateEnvironmentV2__p133441810486">remark</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="CreateEnvironmentV2__p173452134820">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="CreateEnvironmentV2__p173456119486">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="CreateEnvironmentV2__p1534517144817">Description.</p>
<p id="CreateEnvironmentV2__p83455124813">Maximum: <strong id="CreateEnvironmentV2__b153451116483">255</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateEnvironmentV2__section11345412487"><h4 class="sectiontitle">Response Parameters</h4><p id="CreateEnvironmentV2__p53452194812"><strong id="CreateEnvironmentV2__b234617114487">Status code: 201</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEnvironmentV2__response_EnvInfo" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="CreateEnvironmentV2__row63463120483"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="CreateEnvironmentV2__p1534713124816">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="CreateEnvironmentV2__p1534716118481">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p id="CreateEnvironmentV2__p834819116487">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEnvironmentV2__row134620116486"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="CreateEnvironmentV2__p2348101194814">create_time</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="CreateEnvironmentV2__p183493118487">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="CreateEnvironmentV2__p18350101154813">Creation time.</p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row834612120482"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="CreateEnvironmentV2__p9350171184814">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="CreateEnvironmentV2__p143508114819">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="CreateEnvironmentV2__p635151184810">Environment name.</p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row3346151184811"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="CreateEnvironmentV2__p735113114488">remark</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="CreateEnvironmentV2__p173518116488">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="CreateEnvironmentV2__p4351111124814">Description.</p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row1434612174819"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="CreateEnvironmentV2__p735210116487">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="CreateEnvironmentV2__p1135218113487">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="CreateEnvironmentV2__p163524174810">Environment ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateEnvironmentV2__p143522174814"><strong id="CreateEnvironmentV2__b4352151194814">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEnvironmentV2__response_ErrorMsg" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="CreateEnvironmentV2__row17353141194813"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.1"><p id="CreateEnvironmentV2__p2353101194811">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.2"><p id="CreateEnvironmentV2__p3353141144819">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.5.2.4.1.3"><p id="CreateEnvironmentV2__p135411134817">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEnvironmentV2__row163531817489"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="CreateEnvironmentV2__p19354119484">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="CreateEnvironmentV2__p19354111114819">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="CreateEnvironmentV2__p735416114817">Error code.</p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row43531013481"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="CreateEnvironmentV2__p935491204812">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="CreateEnvironmentV2__p735414119489">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="CreateEnvironmentV2__p113541116484">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateEnvironmentV2__p12354714485"><strong id="CreateEnvironmentV2__b12355131144811">Status code: 401</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEnvironmentV2__response_ErrorMsg_1" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="CreateEnvironmentV2__row935516164814"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.1"><p id="CreateEnvironmentV2__p235515115489">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.2"><p id="CreateEnvironmentV2__p33560144818">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.7.2.4.1.3"><p id="CreateEnvironmentV2__p6356714489">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEnvironmentV2__row1935517194814"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="CreateEnvironmentV2__p1235641164814">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="CreateEnvironmentV2__p03561111481">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="CreateEnvironmentV2__p1135617194814">Error code.</p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row1235581174816"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="CreateEnvironmentV2__p735741114815">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="CreateEnvironmentV2__p33571115486">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="CreateEnvironmentV2__p1735720113481">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateEnvironmentV2__p035714164815"><strong id="CreateEnvironmentV2__b193571411485">Status code: 403</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEnvironmentV2__response_ErrorMsg_2" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Response body parameters</caption><thead align="left"><tr id="CreateEnvironmentV2__row1335751184819"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.9.2.4.1.1"><p id="CreateEnvironmentV2__p19358616483">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.9.2.4.1.2"><p id="CreateEnvironmentV2__p83584117487">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.9.2.4.1.3"><p id="CreateEnvironmentV2__p193582174813">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEnvironmentV2__row113571419485"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="CreateEnvironmentV2__p1635915111486">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="CreateEnvironmentV2__p1235913110488">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="CreateEnvironmentV2__p1235915115483">Error code.</p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row4358131174813"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="CreateEnvironmentV2__p10359111114812">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="CreateEnvironmentV2__p17359151154810">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="CreateEnvironmentV2__p7359141124810">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateEnvironmentV2__p236061204819"><strong id="CreateEnvironmentV2__b2360171164810">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEnvironmentV2__response_ErrorMsg_3" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="CreateEnvironmentV2__row7360715484"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.11.2.4.1.1"><p id="CreateEnvironmentV2__p1636118114487">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.11.2.4.1.2"><p id="CreateEnvironmentV2__p20361181164818">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.11.2.4.1.3"><p id="CreateEnvironmentV2__p336151124813">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEnvironmentV2__row113609112483"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.1 "><p id="CreateEnvironmentV2__p4361121164813">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.2 "><p id="CreateEnvironmentV2__p1536120114488">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.11.2.4.1.3 "><p id="CreateEnvironmentV2__p2036217104811">Error code.</p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row1036071164810"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.1 "><p id="CreateEnvironmentV2__p73624154812">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.4.1.2 "><p id="CreateEnvironmentV2__p83623117480">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.11.2.4.1.3 "><p id="CreateEnvironmentV2__p153636184818">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateEnvironmentV2__section63630154811"><h4 class="sectiontitle">Example Requests</h4><p id="CreateEnvironmentV2__p113631118484">Creating an environment</p>
<pre class="screen" id="CreateEnvironmentV2__screen1236331164814">{
"name" : "DEV",
"remark" : "Development environment"
}</pre>
</div>
<div class="section" id="CreateEnvironmentV2__section11364101114817"><h4 class="sectiontitle">Example Responses</h4><p id="CreateEnvironmentV2__p1436413118486"><strong id="CreateEnvironmentV2__b43641017488">Status code: 201</strong></p>
<p id="CreateEnvironmentV2__p436481104810">Created</p>
<pre class="screen" id="CreateEnvironmentV2__screen183641816481">{
"create_time" : "2020-07-31T06:41:43.511347628Z",
"name" : "DEV",
"remark" : "Development environment",
"id" : "7a1ad0c350844ee69479b47df9a881cb"
}</pre>
<p id="CreateEnvironmentV2__p236515112485"><strong id="CreateEnvironmentV2__b133656114485">Status code: 400</strong></p>
<p id="CreateEnvironmentV2__p23671117486">Bad Request</p>
<pre class="screen" id="CreateEnvironmentV2__screen6372201194815">{
"error_code" : "APIG.2012",
"error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation"
}</pre>
<p id="CreateEnvironmentV2__p183731111482"><strong id="CreateEnvironmentV2__b13731018488">Status code: 401</strong></p>
<p id="CreateEnvironmentV2__p33732119481">Unauthorized</p>
<pre class="screen" id="CreateEnvironmentV2__screen93742154816">{
"error_code" : "APIG.1002",
"error_msg" : "Incorrect token or token resolution failed"
}</pre>
<p id="CreateEnvironmentV2__p11375918485"><strong id="CreateEnvironmentV2__b837617119482">Status code: 403</strong></p>
<p id="CreateEnvironmentV2__p137611118487">Forbidden</p>
<pre class="screen" id="CreateEnvironmentV2__screen103765118486">{
"error_code" : "APIG.1005",
"error_msg" : "No permissions to request this method"
}</pre>
<p id="CreateEnvironmentV2__p83779112488"><strong id="CreateEnvironmentV2__b7377201204818">Status code: 500</strong></p>
<p id="CreateEnvironmentV2__p1377121174819">Internal Server Error</p>
<pre class="screen" id="CreateEnvironmentV2__screen237861114817">{
"error_code" : "APIG.9999",
"error_msg" : "System error"
}</pre>
</div>
<div class="section" id="CreateEnvironmentV2__section103781516483"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEnvironmentV2__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="CreateEnvironmentV2__row337910111486"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="CreateEnvironmentV2__p938101174819">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="CreateEnvironmentV2__p4381191144817">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEnvironmentV2__row11379111114816"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="CreateEnvironmentV2__p1138141134819">201</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="CreateEnvironmentV2__p638117184819">Created</p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row1737911114817"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="CreateEnvironmentV2__p6382718486">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="CreateEnvironmentV2__p1238214114813">Bad Request</p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row1538019154812"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="CreateEnvironmentV2__p16382116488">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="CreateEnvironmentV2__p938251194817">Unauthorized</p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row1238013113484"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="CreateEnvironmentV2__p938201114811">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="CreateEnvironmentV2__p53828110488">Forbidden</p>
</td>
</tr>
<tr id="CreateEnvironmentV2__row9381111144811"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="CreateEnvironmentV2__p438211164814">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="CreateEnvironmentV2__p13383141104814">Internal Server Error</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateEnvironmentV2__section73831215482"><h4 class="sectiontitle">Error Codes</h4><p id="CreateEnvironmentV2__p5383101154819">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="EnvManagement.html">Environment Management</a></div>
</div>
</div>