forked from docs/doc-exports
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>
196 lines
14 KiB
HTML
196 lines
14 KiB
HTML
<a name="swr_02_0042"></a><a name="swr_02_0042"></a>
|
|
|
|
<h1 class="topictitle1">Creating Organization Permissions</h1>
|
|
<div id="body1531798197453"><div class="section" id="swr_02_0042__section76014524479"><h4 class="sectiontitle">Function</h4><p id="swr_02_0042__p117622117485">Grant permissions of an organization to certain users so that they can manage, edit, and read images from the organization.</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__section743192122010"><h4 class="sectiontitle">Constraints</h4><p id="swr_02_0042__p1643172116207">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__section1601752124717"><h4 class="sectiontitle">URI</h4><p id="swr_02_0042__p760155294719">POST /v2/manage/namespaces/{<em id="swr_02_0042__i4550211184119">namespace</em>}/access</p>
|
|
<p id="swr_02_0042__p11227850114718"><a href="#swr_02_0042__table1860452124716">Table 1</a> describes the parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="swr_02_0042__table1860452124716"></a><a name="table1860452124716"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0042__table1860452124716" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="swr_02_0042__row160152124718"><th align="left" class="cellrowborder" valign="top" width="17.349999999999998%" id="mcps1.3.3.4.2.5.1.1"><p id="swr_02_0042__p7435121793714">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.48%" id="mcps1.3.3.4.2.5.1.2"><p id="swr_02_0042__p543541783710">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.05%" id="mcps1.3.3.4.2.5.1.3"><p id="swr_02_0042__p876811119619">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="55.120000000000005%" id="mcps1.3.3.4.2.5.1.4"><p id="swr_02_0042__p1943561743713">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0042__row15611522475"><td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.3.4.2.5.1.1 "><p id="swr_02_0042__p96135294712">namespace</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.48%" headers="mcps1.3.3.4.2.5.1.2 "><p id="swr_02_0042__p1884432818210">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.05%" headers="mcps1.3.3.4.2.5.1.3 "><p id="swr_02_0042__p284310281826">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.120000000000005%" headers="mcps1.3.3.4.2.5.1.4 "><p id="swr_02_0042__p19616524474">Organization name.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__section166115217472"><h4 class="sectiontitle">Request</h4><ul id="swr_02_0042__ul411124517580"><li id="swr_02_0042__li8111145105818">Request parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0042__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="swr_02_0042__row844502122013"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="swr_02_0042__p3446182132010">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="swr_02_0042__p74471421102020">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="swr_02_0042__p144732117200">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="swr_02_0042__p8448122118202">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0042__row144572111209"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="swr_02_0042__p134491521162020">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="swr_02_0042__p1645052119203">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="swr_02_0042__p845142113209">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="swr_02_0042__p345242192017">Message body type (format). The value can be <strong id="swr_02_0042__b110443856972228">application/json</strong> or <strong id="swr_02_0042__b205853238372228">charset=utf-8 application/json</strong>.</p>
|
|
<p id="swr_02_0042__p1245212114205">The default value is <strong id="swr_02_0042__b95861457472314">application/json</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__row20445021102011"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="swr_02_0042__p1345352117206">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="swr_02_0042__p545302111200">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="swr_02_0042__p945415213206">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="swr_02_0042__p13454152152010">User token.</p>
|
|
<p id="swr_02_0042__p19455102152015">The token can be obtained by calling an IAM API. The value of <strong id="swr_02_0042__b205054344871424">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_0042__table202391481153" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="swr_02_0042__row72398489516"><th align="left" class="cellrowborder" valign="top" width="17.349999999999998%" id="mcps1.3.4.2.1.2.2.5.1.1"><p id="swr_02_0042__p72407481958">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.48%" id="mcps1.3.4.2.1.2.2.5.1.2"><p id="swr_02_0042__p1624016481457">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.05%" id="mcps1.3.4.2.1.2.2.5.1.3"><p id="swr_02_0042__p16240848251">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="55.120000000000005%" id="mcps1.3.4.2.1.2.2.5.1.4"><p id="swr_02_0042__p82400481556">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0042__row132401487515"><td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="swr_02_0042__p162402487513">[Array element]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.48%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="swr_02_0042__p5240124820512">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.05%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="swr_02_0042__p14240104812512">Array of <a href="#swr_02_0042__table196185211479">objects</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.120000000000005%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="swr_02_0042__p12240114819515">Information required for creating organization permissions.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="swr_02_0042__table196185211479"></a><a name="table196185211479"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0042__table196185211479" frame="border" border="1" rules="all"><caption><b>Table 4 </b>[Array element]</caption><thead align="left"><tr id="swr_02_0042__row176175274712"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.1.3.2.5.1.1"><p id="swr_02_0042__p1324110491762">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.4.2.1.3.2.5.1.2"><p id="swr_02_0042__p22411349265">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.2.1.3.2.5.1.3"><p id="swr_02_0042__p152414491669">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="54%" id="mcps1.3.4.2.1.3.2.5.1.4"><p id="swr_02_0042__p8241114913611">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0042__row166111529478"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.3.2.5.1.1 "><p id="swr_02_0042__p18611052194713">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.1.3.2.5.1.2 "><p id="swr_02_0042__p1953615511268">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.1.3.2.5.1.3 "><p id="swr_02_0042__p69014461148">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.4.2.1.3.2.5.1.4 "><p id="swr_02_0042__p1347022132015">User ID. Obtain it from IAM.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__row76135214711"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.3.2.5.1.1 "><p id="swr_02_0042__p126175254713">user_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.1.3.2.5.1.2 "><p id="swr_02_0042__p6728195716615">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.1.3.2.5.1.3 "><p id="swr_02_0042__p690624614140">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.4.2.1.3.2.5.1.4 "><p id="swr_02_0042__p047222132019">Username. Obtain it from IAM.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__row26195204719"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.3.2.5.1.1 "><p id="swr_02_0042__p562125284716">auth</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.1.3.2.5.1.2 "><p id="swr_02_0042__p973715571366">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.1.3.2.5.1.3 "><p id="swr_02_0042__p12295101317202">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.4.2.1.3.2.5.1.4 "><p id="swr_02_0042__p128042111208">User permission</p>
|
|
<ul id="swr_02_0042__ul654813144019"><li id="swr_02_0042__li115901316202">7: Manage</li><li id="swr_02_0042__li55991417708">3: Write</li><li id="swr_02_0042__li15482141406">1: Read</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="swr_02_0042__li479024615588">Example request<pre class="screen" id="swr_02_0042__screen54785217203">POST https://{endpoint}/v2/manage/namespaces/{namespace}/access
|
|
|
|
[ {
|
|
"user_id" : "fb3f175c1fd146ab8cdae3272be6107b",
|
|
"user_name" : "user01",
|
|
"auth" : 1
|
|
} ]</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__section3621952114711"><h4 class="sectiontitle">Response</h4><ul id="swr_02_0042__ul11656391015"><li id="swr_02_0042__li194756411106">Response parameters<p id="swr_02_0042__p370911481507"><a name="swr_02_0042__li194756411106"></a><a name="li194756411106"></a>N/A</p>
|
|
</li><li id="swr_02_0042__li129849446013">Example response<pre class="screen" id="swr_02_0042__screen148234561804">None</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__section17621852184720"><h4 class="sectiontitle">Status Code</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0042__table26275220474" frame="border" border="1" rules="all"><thead align="left"><tr id="swr_02_0042__row14627522473"><th align="left" class="cellrowborder" valign="top" width="16.439999999999998%" id="mcps1.3.6.2.1.3.1.1"><p id="swr_02_0042__p15519411418">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="83.56%" id="mcps1.3.6.2.1.3.1.2"><p id="swr_02_0042__p85214434110">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0042__row86285213474"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.6.2.1.3.1.1 "><p id="swr_02_0042__p06205213473">201</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.6.2.1.3.1.2 "><p id="swr_02_0042__p125033664815">Creation successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__row166235204714"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.6.2.1.3.1.1 "><p id="swr_02_0042__p1462175244715">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.6.2.1.3.1.2 "><p id="swr_02_0042__p450143634820">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__row1962165274716"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.6.2.1.3.1.1 "><p id="swr_02_0042__p17621352164717">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.6.2.1.3.1.2 "><p id="swr_02_0042__p75033614814">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__row46275254711"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.6.2.1.3.1.1 "><p id="swr_02_0042__p12621052144713">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.6.2.1.3.1.2 "><p id="swr_02_0042__p10501336134817">The organization does not exist.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__row1444262242819"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.6.2.1.3.1.1 "><p id="swr_02_0042__p174431922132816">409</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.6.2.1.3.1.2 "><p id="swr_02_0042__p1444316223283">The organization permission already exists.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0042__row8631152104712"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.6.2.1.3.1.1 "><p id="swr_02_0042__p106315527479">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.6.2.1.3.1.2 "><p id="swr_02_0042__aa6fd12cedd8841e29eeeca27c1bdea1a">Internal error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0042__section134071631161117"><h4 class="sectiontitle">Error Codes</h4><p id="swr_02_0042__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_0000001421005366.html">Organization Permission Management</a></div>
|
|
</div>
|
|
</div>
|
|
|