1
0
forked from docs/doc-exports
doc-exports/docs/swr/api-ref/swr_02_0048.html
Dong, Qiu Jian 150bc2026a SWR API initial version reuploaded -20221102
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
2022-11-10 10:18:36 +00:00

141 lines
9.7 KiB
HTML

<a name="swr_02_0048"></a><a name="swr_02_0048"></a>
<h1 class="topictitle1">Updating Image Permissions</h1>
<div id="body1531798197465"><div class="section" id="swr_02_0048__se03aae4436e64394a95dc13b6f233898"><h4 class="sectiontitle">Function</h4><p id="swr_02_0048__a7005bd3228d34f8ea0fb7b75b17cfbb2">Update the image operation permissions for certain users.</p>
</div>
<div class="section" id="swr_02_0048__s476df674307e4b04b9545f9575dde042"><h4 class="sectiontitle">URI</h4><p id="swr_02_0048__p3537273892216">PATCH /v2/manage/namespaces/{<em id="swr_02_0048__i714132210811">namespace</em>}/repos/{<em id="swr_02_0048__i113716271588">repository</em>}/access</p>
<p id="swr_02_0048__p4326739133411">For details about parameters, see <a href="#swr_02_0048__table73271639103420">Table 1</a>.</p>
<div class="tablenoborder"><a name="swr_02_0048__table73271639103420"></a><a name="table73271639103420"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0048__table73271639103420" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="swr_02_0048__row53291539153419"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.2.4.2.5.1.1"><p id="swr_02_0048__p6331539113416">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.2.4.2.5.1.2"><p id="swr_02_0048__p108968583240">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.2.4.2.5.1.3"><p id="swr_02_0048__p11896658132415">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54%" id="mcps1.3.2.4.2.5.1.4"><p id="swr_02_0048__p43347399345">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0048__row7335939103416"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.4.2.5.1.1 "><p id="swr_02_0048__p6843228526">namespace</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.2.4.2.5.1.2 "><p id="swr_02_0048__p1289615589248">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.4.2.5.1.3 "><p id="swr_02_0048__p188961458142412">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.2.4.2.5.1.4 "><p id="swr_02_0048__p776511203467">Organization name</p>
</td>
</tr>
<tr id="swr_02_0048__row1316181182114"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.4.2.5.1.1 "><p id="swr_02_0048__p1816115113217">repository</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.2.4.2.5.1.2 "><p id="swr_02_0048__p108971758102416">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.4.2.5.1.3 "><p id="swr_02_0048__p12897145852415">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.2.4.2.5.1.4 "><p id="swr_02_0048__p31611811102113">Image name</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="swr_02_0048__s8246d3afdd6f44dc817ce0c3f2ac7d53"><h4 class="sectiontitle">Request</h4><ul id="swr_02_0048__ul17902859151013"><li id="swr_02_0048__li1690218596102">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0048__table6912142367" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameter description</caption><thead align="left"><tr id="swr_02_0048__row494101419361"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="swr_02_0048__p495214193611">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="swr_02_0048__p763819132514">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="swr_02_0048__p15638892255">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="swr_02_0048__p1498214113618">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0048__row69961413365"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="swr_02_0048__p1110011416365">user_id</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="swr_02_0048__p186387916259">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="swr_02_0048__p1263818912520">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="swr_02_0048__p46175204712">User ID.</p>
</td>
</tr>
<tr id="swr_02_0048__row3105101418360"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="swr_02_0048__p3107314193615">user_name</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="swr_02_0048__p56389912515">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="swr_02_0048__p763816917251">String</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="swr_02_0048__p1761185234713">Username.</p>
</td>
</tr>
<tr id="swr_02_0048__row135101232143711"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="swr_02_0048__p35101132143714">auth</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="swr_02_0048__p9638791258">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="swr_02_0048__p18638189142515">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="swr_02_0048__p1751033214375">User permission that is configured.</p>
<ul id="swr_02_0048__ul654813144019"><li id="swr_02_0048__li115901316202">7: Manage</li><li id="swr_02_0048__li55991417708">3: Write</li><li id="swr_02_0048__li15482141406">1: Read</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="swr_02_0048__li17451822110">Example request<pre class="screen" id="swr_02_0048__screen1187634103814">PATCH https://{Endpoint}/v2/manage/namespaces/<em id="swr_02_0048__i1249054713815">group</em>/repos/<em id="swr_02_0048__i1248717510386">busybox</em>/access</pre>
<p id="swr_02_0048__p18630858103717">Body:</p>
<pre class="screen" id="swr_02_0048__screen11748172212473">[
{
"user_id": "fb3f175c1fd146ab8cdae3272be6107b",
"user_name": "user01",
"auth": 7
}
]</pre>
</li></ul>
</div>
<div class="section" id="swr_02_0048__sab9be5ce850743859bb238e072f8d1f2"><h4 class="sectiontitle">Response</h4><ul id="swr_02_0048__ul11656391015"><li id="swr_02_0048__li194756411106">Response parameters<p id="swr_02_0048__p370911481507"><a name="swr_02_0048__li194756411106"></a><a name="li194756411106"></a>N/A</p>
</li><li id="swr_02_0048__li129849446013">Example response<pre class="screen" id="swr_02_0048__screen148234561804">{}</pre>
</li></ul>
</div>
<div class="section" id="swr_02_0048__s336c1dbc7af446a1b3cc077ea3f82fc9"><h4 class="sectiontitle">Status Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0048__t33d02fa79e8443868a71c99f411610a5" frame="border" border="1" rules="all"><thead align="left"><tr id="swr_02_0048__r9eb80d64e8f34d0db940daa95fc929dd"><th align="left" class="cellrowborder" valign="top" width="16.439999999999998%" id="mcps1.3.5.2.1.3.1.1"><p id="swr_02_0048__a7e51ed73a71e4dc29d0dd4aae3016632">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="83.56%" id="mcps1.3.5.2.1.3.1.2"><p id="swr_02_0048__aa802d02e21c944f1863435a0d11c7ec1">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0048__r1cc0192c651444db882dde750b14be23"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.5.2.1.3.1.1 "><p id="swr_02_0048__a6a3639a3cb154e17b95c5076c8036471">201</p>
</td>
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.5.2.1.3.1.2 "><p id="swr_02_0048__ad54ae639e7f94380a87bfc10cc91a4f0">Updated successfully.</p>
</td>
</tr>
<tr id="swr_02_0048__r0bd68000afe546dd9c7a8d3a05991a04"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.5.2.1.3.1.1 "><p id="swr_02_0048__ad46ccdc6b7e04df3b6b5679f7606f434">400</p>
</td>
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.5.2.1.3.1.2 "><p id="swr_02_0048__a1f2e8d58145d461781428d28f07a5351">Request error.</p>
</td>
</tr>
<tr id="swr_02_0048__row059261364320"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.5.2.1.3.1.1 "><p id="swr_02_0048__p059261310438">401</p>
</td>
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.5.2.1.3.1.2 "><p id="swr_02_0048__p759261314433">Authentication failed.</p>
</td>
</tr>
<tr id="swr_02_0048__row9547111612437"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.5.2.1.3.1.1 "><p id="swr_02_0048__p19547131615432">404</p>
</td>
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.5.2.1.3.1.2 "><p id="swr_02_0048__p16547416114315">The image or the image permission does not exist.</p>
</td>
</tr>
<tr id="swr_02_0048__r19bdef782c164c93917f897241e521f8"><td class="cellrowborder" valign="top" width="16.439999999999998%" headers="mcps1.3.5.2.1.3.1.1 "><p id="swr_02_0048__a7da68e311c0f4267bacf3cbdb71d1ead">500</p>
</td>
<td class="cellrowborder" valign="top" width="83.56%" headers="mcps1.3.5.2.1.3.1.2 "><p id="swr_02_0048__aa6fd12cedd8841e29eeeca27c1bdea1a">Internal error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="swr_02_0011.html">API</a></div>
</div>
</div>