Files
doc-exports/docs/swr/api-ref/swr_02_0026.html
qiujiandong1 73ffc816f4 SWR API 20250521 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
2025-10-29 10:18:41 +00:00

123 lines
10 KiB
HTML

<a name="swr_02_0026"></a><a name="swr_02_0026"></a>
<h1 class="topictitle1">Creating an Organization</h1>
<div id="body8662426"><div class="section" id="swr_02_0026__en-us_topic_0000001185595782_section3983612313"><h4 class="sectiontitle">Description</h4><p id="swr_02_0026__en-us_topic_0000001185595782_p5918368313">Create an organization.</p>
</div>
<div class="section" id="swr_02_0026__en-us_topic_0000001185595782_section2010133623112"><h4 class="sectiontitle">Constraints</h4><p id="swr_02_0026__en-us_topic_0000001185595782_p181083615312">None</p>
</div>
<div class="section" id="swr_02_0026__en-us_topic_0000001185595782_section161023683118"><h4 class="sectiontitle">URI</h4><p id="swr_02_0026__en-us_topic_0000001185595782_p41183663116">POST /v2/manage/namespaces</p>
</div>
<div class="section" id="swr_02_0026__en-us_topic_0000001185595782_section1211236163111"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0026__en-us_topic_0000001185595782_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request header parameters</caption><thead align="left"><tr id="swr_02_0026__en-us_topic_0000001185595782_row19121036123113"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="swr_02_0026__en-us_topic_0000001185595782_p7131136193114">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="swr_02_0026__en-us_topic_0000001185595782_p214536153118">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="swr_02_0026__en-us_topic_0000001185595782_p41419364315">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="swr_02_0026__en-us_topic_0000001185595782_p1814163612310">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0026__en-us_topic_0000001185595782_row512136203114"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0026__en-us_topic_0000001185595782_p19141361311">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0026__en-us_topic_0000001185595782_p91553617311">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0026__en-us_topic_0000001185595782_p101553611319">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0026__en-us_topic_0000001185595782_p1515183612314">Message body type (format). The value can be <strong id="swr_02_0026__en-us_topic_0000001185595782_b11158203745710">application/json</strong> or <strong id="swr_02_0026__en-us_topic_0000001185595782_b1415815379574">charset=utf-8 application/json</strong>.</p>
<p id="swr_02_0026__en-us_topic_0000001185595782_p11515369313">Default value: <strong id="swr_02_0026__en-us_topic_0000001185595782_b1451044013578">application/json</strong></p>
</td>
</tr>
<tr id="swr_02_0026__en-us_topic_0000001185595782_row16121936163116"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0026__en-us_topic_0000001185595782_p18161236163116">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0026__en-us_topic_0000001185595782_p1716123643110">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0026__en-us_topic_0000001185595782_p1216163653111">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0026__en-us_topic_0000001185595782_p1717193673113">User token.</p>
<p id="swr_02_0026__en-us_topic_0000001185595782_p01713612318">The token can be obtained by calling the IAM API used to obtain a user token. The value of <strong id="swr_02_0026__en-us_topic_0000001185595782_b1922169842104414">X-Subject-Token</strong> in the response header is the user token.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0026__en-us_topic_0000001185595782_request_CreateNamespaceRequestBody" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameter</caption><thead align="left"><tr id="swr_02_0026__en-us_topic_0000001185595782_row1217193673119"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="swr_02_0026__en-us_topic_0000001185595782_p161883614319">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="swr_02_0026__en-us_topic_0000001185595782_p41833653113">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="swr_02_0026__en-us_topic_0000001185595782_p101833683110">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="swr_02_0026__en-us_topic_0000001185595782_p41915368319">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0026__en-us_topic_0000001185595782_row1617183603118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="swr_02_0026__en-us_topic_0000001185595782_p9192368314">namespace</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="swr_02_0026__en-us_topic_0000001185595782_p8199364318">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="swr_02_0026__en-us_topic_0000001185595782_p152093619314">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="swr_02_0026__en-us_topic_0000001185595782_p8201364312">Organization name. Enter 1 to 64 characters, starting with a lowercase letter and ending with a lowercase letter or digit. Only lowercase letters, digits, periods (.), underscores (_), and hyphens (-) are allowed. Periods, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="swr_02_0026__en-us_topic_0000001185595782_section12043633116"><h4 class="sectiontitle">Response Parameters</h4><p id="swr_02_0026__en-us_topic_0000001185595782_p82093613111">None</p>
</div>
<div class="section" id="swr_02_0026__en-us_topic_0000001185595782_section1420113663111"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="swr_02_0026__en-us_topic_0000001185595782_screen12153615319">POST https://{endpoint}/v2/manage/namespaces
{
"namespace" : "group"
}</pre>
</div>
<div class="section" id="swr_02_0026__en-us_topic_0000001185595782_section182233614315"><h4 class="sectiontitle">Example Response</h4><p id="swr_02_0026__en-us_topic_0000001185595782_p1022133633110">None</p>
</div>
<div class="section" id="swr_02_0026__en-us_topic_0000001185595782_section163915364318"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0026__en-us_topic_0000001185595782_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="swr_02_0026__en-us_topic_0000001185595782_row1240836133116"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="swr_02_0026__en-us_topic_0000001185595782_p2415362312">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="swr_02_0026__en-us_topic_0000001185595782_p14143613317">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0026__en-us_topic_0000001185595782_row1440836173114"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0026__en-us_topic_0000001185595782_p164213619311">201</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0026__en-us_topic_0000001185595782_p242836173118">Organization created.</p>
</td>
</tr>
<tr id="swr_02_0026__en-us_topic_0000001185595782_row1140936133113"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0026__en-us_topic_0000001185595782_p642153653113">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0026__en-us_topic_0000001185595782_p142193619314">The request is incorrect or the number of namespaces exceeds the upper limit.</p>
</td>
</tr>
<tr id="swr_02_0026__en-us_topic_0000001185595782_row2041143633111"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0026__en-us_topic_0000001185595782_p1243113643119">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0026__en-us_topic_0000001185595782_p143193613314">Authentication failed.</p>
</td>
</tr>
<tr id="swr_02_0026__en-us_topic_0000001185595782_row24173613113"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0026__en-us_topic_0000001185595782_p543636173116">409</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0026__en-us_topic_0000001185595782_p11431936143119">The resource already exists.</p>
</td>
</tr>
<tr id="swr_02_0026__en-us_topic_0000001185595782_row14411536193115"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0026__en-us_topic_0000001185595782_p344193643113">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0026__en-us_topic_0000001185595782_p844636113117">Internal error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="swr_02_0026__en-us_topic_0000001185595782_section1444336163120"><h4 class="sectiontitle">Error Codes</h4><p id="swr_02_0026__en-us_topic_0000001185595782_p1044163693113">For details, see <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="swr_02_0025.html">Organization Management</a></div>
</div>
</div>