doc-exports/docs/swr/api-ref/swr_02_0028.html
Dong, Qiu Jian f5c28c856a SWR API update 20241012
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
2024-10-18 07:19:46 +00:00

198 lines
14 KiB
HTML

<a name="swr_02_0028"></a><a name="swr_02_0028"></a>
<h1 class="topictitle1">Querying the List of Organizations</h1>
<div id="body1531798197424"><div class="section" id="swr_02_0028__se03aae4436e64394a95dc13b6f233898"><h4 class="sectiontitle">Function</h4><p id="swr_02_0028__a7005bd3228d34f8ea0fb7b75b17cfbb2">Query the list of organizations.</p>
</div>
<div class="section" id="swr_02_0028__s476df674307e4b04b9545f9575dde042"><h4 class="sectiontitle">URI</h4><p id="swr_02_0028__p1754193353216">GET /v2/manage/namespaces</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0028__table775611337326" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Query parameters</caption><thead align="left"><tr id="swr_02_0028__row475553353216"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="swr_02_0028__p1575614335322">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="swr_02_0028__p11756183383219">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="swr_02_0028__p1875773373217">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="swr_02_0028__p16757163314328">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0028__row575513323212"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="swr_02_0028__p6757183313321">namespace</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="swr_02_0028__p2757133316321">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="swr_02_0028__p1875823315325">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="swr_02_0028__p3758733183220">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>
<tr id="swr_02_0028__row117557331326"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="swr_02_0028__p9758153313323">filter</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="swr_02_0028__p20759193312328">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="swr_02_0028__p177591333183215">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="swr_02_0028__p975933313217">Enter <strong id="swr_02_0028__b390012385516">namespace::{<em id="swr_02_0028__i10404167121018">namespace</em>}|mode::{<em id="swr_02_0028__i2738510191016">mode</em>}</strong>. <strong id="swr_02_0028__b17862175420517">{namespace}</strong> indicates the organization name. If <strong id="swr_02_0028__b734716501866">{mode}</strong> is not set, the list of authorized organizations is displayed. If <strong id="swr_02_0028__b1525002211719">{mode}</strong> is set to <strong id="swr_02_0028__b19420271475">visible</strong>, the list of visible organizations is displayed. (Some organizations can be viewed by the repository, but cannot by the organization.)</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="swr_02_0028__section161551131201115"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0028__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="swr_02_0028__row115693181110"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="swr_02_0028__p16157183161116">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="swr_02_0028__p1915753110119">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="swr_02_0028__p1815883119118">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="swr_02_0028__p515819311111">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0028__row161561031111110"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="swr_02_0028__p5159143117112">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="swr_02_0028__p121591431191115">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="swr_02_0028__p51601631141114">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="swr_02_0028__p1316003117114">Message body type (format). The value can be <strong id="swr_02_0028__b155011321590">application/json</strong> or <strong id="swr_02_0028__b165019321698">charset=utf-8 application/json</strong>.</p>
<p id="swr_02_0028__p1161193111110">The default value is <strong id="swr_02_0028__b2016120315118">application/json</strong>.</p>
</td>
</tr>
<tr id="swr_02_0028__row4156143161118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="swr_02_0028__p14161123141114">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="swr_02_0028__p15162183101111">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="swr_02_0028__p1216310319115">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="swr_02_0028__p516413311119">User token.</p>
<p id="swr_02_0028__p716513151111">The token can be obtained by calling an IAM API. The value of <strong id="swr_02_0028__b1686974331016">X-Subject-Token</strong> in the response header is the user token.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="swr_02_0028__note1052431917212"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="swr_02_0028__p1883181417175">By default, all organizations will be returned.</p>
</div></div>
</div>
<div class="section" id="swr_02_0028__sab9be5ce850743859bb238e072f8d1f2"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0028__table34001413863" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameter description</caption><thead align="left"><tr id="swr_02_0028__row17400171319612"><th align="left" class="cellrowborder" valign="top" width="20.89%" id="mcps1.3.4.2.2.4.1.1"><p id="swr_02_0028__p1840015139619">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.11%" id="mcps1.3.4.2.2.4.1.2"><p id="swr_02_0028__p24002135620">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59%" id="mcps1.3.4.2.2.4.1.3"><p id="swr_02_0028__p174008131163">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0028__row11400113668"><td class="cellrowborder" valign="top" width="20.89%" headers="mcps1.3.4.2.2.4.1.1 "><p id="swr_02_0028__p14008131464">namespaces</p>
</td>
<td class="cellrowborder" valign="top" width="20.11%" headers="mcps1.3.4.2.2.4.1.2 "><p id="swr_02_0028__p9400151314615">Array of <a href="#swr_02_0028__table1787854911167">objects</a></p>
</td>
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.4.2.2.4.1.3 "><p id="swr_02_0028__p1840110136612">Organization list</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="swr_02_0028__table1787854911167"></a><a name="table1787854911167"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0028__table1787854911167" frame="border" border="1" rules="all"><caption><b>Table 4 </b>namespaces parameter description</caption><thead align="left"><tr id="swr_02_0028__row1588184916165"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.4.3.2.4.1.1"><p id="swr_02_0028__p158847496166">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="swr_02_0028__p2088624911169">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59%" id="mcps1.3.4.3.2.4.1.3"><p id="swr_02_0028__p128875496169">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0028__row888994917169"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.3.2.4.1.1 "><p id="swr_02_0028__p1889144915167">ID</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="swr_02_0028__p189324913167">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.4.3.2.4.1.3 "><p id="swr_02_0028__p14894149141612">Organization ID</p>
</td>
</tr>
<tr id="swr_02_0028__row19895649171616"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.3.2.4.1.1 "><p id="swr_02_0028__p589616491166">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="swr_02_0028__p990115495162">String</p>
</td>
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.4.3.2.4.1.3 "><p id="swr_02_0028__p2904184981613">Organization name</p>
</td>
</tr>
<tr id="swr_02_0028__row1576047252"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.3.2.4.1.1 "><p id="swr_02_0028__p3578164162517">creator_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="swr_02_0028__p8578134122515">String</p>
</td>
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.4.3.2.4.1.3 "><p id="swr_02_0028__p1557814492513">IAM username</p>
</td>
</tr>
<tr id="swr_02_0028__row670815227263"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.4.3.2.4.1.1 "><p id="swr_02_0028__p270822232620">auth</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="swr_02_0028__p11708622162613">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.4.3.2.4.1.3 "><p id="swr_02_0028__p3922141818192">User permission</p>
<ul id="swr_02_0028__ul1371263010195"><li id="swr_02_0028__li189653313198">7: Manage</li><li id="swr_02_0028__li35307340190">3: Write</li><li id="swr_02_0028__li127124307191">1: Read</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="swr_02_0028__section078693911218"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="swr_02_0028__screen5873105511128">GET https://{Endpoint}/v2/manage/namespaces?namespace=<em id="swr_02_0028__i387365511128">group</em></pre>
</div>
<div class="section" id="swr_02_0028__section14619988137"><h4 class="sectiontitle">Example Response</h4><p id="swr_02_0028__p1316124412136">Status code: 200</p>
<p id="swr_02_0028__p156071253171318">The list of organizations is returned successfully.</p>
<pre class="screen" id="swr_02_0028__screen16439133131319">{
"namespaces": [
{
"id": 1343008,
"name": "group",
"creator_name": "username",
"auth": 7
}
]
}</pre>
</div>
<div class="section" id="swr_02_0028__s336c1dbc7af446a1b3cc077ea3f82fc9"><h4 class="sectiontitle">Status Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0028__t33d02fa79e8443868a71c99f411610a5" frame="border" border="1" rules="all"><thead align="left"><tr id="swr_02_0028__r9eb80d64e8f34d0db940daa95fc929dd"><th align="left" class="cellrowborder" valign="top" width="16.439999999999998%" id="mcps1.3.7.2.1.3.1.1"><p id="swr_02_0028__a7e51ed73a71e4dc29d0dd4aae3016632">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="83.56%" id="mcps1.3.7.2.1.3.1.2"><p id="swr_02_0028__aa802d02e21c944f1863435a0d11c7ec1">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0028__r1cc0192c651444db882dde750b14be23"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.7.2.1.3.1.1 "><p id="swr_02_0028__a6a3639a3cb154e17b95c5076c8036471">200</p>
</td>
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.7.2.1.3.1.2 "><p id="swr_02_0028__ad54ae639e7f94380a87bfc10cc91a4f0">Query succeeded.</p>
</td>
</tr>
<tr id="swr_02_0028__r0bd68000afe546dd9c7a8d3a05991a04"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.7.2.1.3.1.1 "><p id="swr_02_0028__ad46ccdc6b7e04df3b6b5679f7606f434">400</p>
</td>
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.7.2.1.3.1.2 "><p id="swr_02_0028__a1f2e8d58145d461781428d28f07a5351">Request error.</p>
</td>
</tr>
<tr id="swr_02_0028__row059261364320"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.7.2.1.3.1.1 "><p id="swr_02_0028__p059261310438">401</p>
</td>
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.7.2.1.3.1.2 "><p id="swr_02_0028__p759261314433">Authentication failed.</p>
</td>
</tr>
<tr id="swr_02_0028__row9547111612437"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.7.2.1.3.1.1 "><p id="swr_02_0028__p19547131615432">404</p>
</td>
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.7.2.1.3.1.2 "><p id="swr_02_0028__p16547416114315">The organization does not exist.</p>
</td>
</tr>
<tr id="swr_02_0028__r19bdef782c164c93917f897241e521f8"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.7.2.1.3.1.1 "><p id="swr_02_0028__a7da68e311c0f4267bacf3cbdb71d1ead">500</p>
</td>
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.7.2.1.3.1.2 "><p id="swr_02_0028__aa6fd12cedd8841e29eeeca27c1bdea1a">Internal error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="swr_02_0028__section134071631161117"><h4 class="sectiontitle">Error Codes</h4><p id="swr_02_0028__p15408431161114">For details, see <a href="swr_02_0024.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0000001420846090.html">Organization Management</a></div>
</div>
</div>