forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com> Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
216 lines
18 KiB
HTML
216 lines
18 KiB
HTML
<a name="swr_02_0049"></a><a name="swr_02_0049"></a>
|
|
|
|
<h1 class="topictitle1">Querying Image Permissions</h1>
|
|
<div id="body8662426"><div class="section" id="swr_02_0049__en-us_topic_0000001231195475_section7330165185810"><h4 class="sectiontitle">Description</h4><p id="swr_02_0049__en-us_topic_0000001231195475_p103314595812">Query image permissions.</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0049__en-us_topic_0000001231195475_section13312595817"><h4 class="sectiontitle">Constraints</h4><p id="swr_02_0049__en-us_topic_0000001231195475_p43322514581">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0049__en-us_topic_0000001231195475_section23341953584"><h4 class="sectiontitle">URI</h4><p id="swr_02_0049__en-us_topic_0000001231195475_p143366575813">GET /v2/manage/namespaces/{namespace}/repos/{repository}/access</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0049__en-us_topic_0000001231195475_table163394575817" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="swr_02_0049__en-us_topic_0000001231195475_row1833616515818"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="swr_02_0049__en-us_topic_0000001231195475_p13394595814">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="swr_02_0049__en-us_topic_0000001231195475_p5340105135816">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="swr_02_0049__en-us_topic_0000001231195475_p53417565810">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="swr_02_0049__en-us_topic_0000001231195475_p834213565819">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0049__en-us_topic_0000001231195475_row1833719535810"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p634213511588">namespace</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p234313514589">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0049__en-us_topic_0000001231195475_p1534414518584">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0049__en-us_topic_0000001231195475_p934514535812">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_0049__en-us_topic_0000001231195475_row1533712513582"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p19346165165818">repository</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p153471454587">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0049__en-us_topic_0000001231195475_p2348185115812">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0049__en-us_topic_0000001231195475_p1833713588245">Image repository name. Enter 1 to 128 characters. It must start and end with a lowercase letter or digit. Only lowercase letters, digits, periods (.), slashes (/), underscores (_), and hyphens (-) are allowed. Periods, slashes, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed. Replace a slash (/) with a dollar sign ($) before you send the request.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0049__en-us_topic_0000001231195475_section0350125185812"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0049__en-us_topic_0000001231195475_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="swr_02_0049__en-us_topic_0000001231195475_row335113510589"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="swr_02_0049__en-us_topic_0000001231195475_p16352115105818">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_0049__en-us_topic_0000001231195475_p83531516580">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_0049__en-us_topic_0000001231195475_p135413565818">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_0049__en-us_topic_0000001231195475_p23548513583">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0049__en-us_topic_0000001231195475_row635114517588"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p123555565815">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p73569565810">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0049__en-us_topic_0000001231195475_p0356105145816">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0049__en-us_topic_0000001231195475_p1135718565818">Message body type (format). The value can be <strong id="swr_02_0049__en-us_topic_0000001231195475_b134867131516">application/json</strong> or <strong id="swr_02_0049__en-us_topic_0000001231195475_b1486613716">charset=utf-8 application/json</strong>.</p>
|
|
<p id="swr_02_0049__en-us_topic_0000001231195475_p18358105145814">Default value: <strong id="swr_02_0049__en-us_topic_0000001231195475_b1436691619118">application/json</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0049__en-us_topic_0000001231195475_row235114520586"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p03590516589">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_0049__en-us_topic_0000001231195475_p836005135815">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0049__en-us_topic_0000001231195475_p173602515813">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0049__en-us_topic_0000001231195475_p11361125135819">User token.</p>
|
|
<p id="swr_02_0049__en-us_topic_0000001231195475_p536265185813">The token can be obtained by calling the IAM API used to obtain a user token. The value of <strong id="swr_02_0049__en-us_topic_0000001231195475_b68289334811912">X-Subject-Token</strong> in the response header is the user token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0049__en-us_topic_0000001231195475_section1736335185817"><h4 class="sectiontitle">Response Parameters</h4><p id="swr_02_0049__en-us_topic_0000001231195475_p5364955588"><strong id="swr_02_0049__en-us_topic_0000001231195475_b1908696192111035">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0049__en-us_topic_0000001231195475_response_ShowRepositoryAuthResp" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="swr_02_0049__en-us_topic_0000001231195475_row1836515519585"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="swr_02_0049__en-us_topic_0000001231195475_p1636614516584">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="swr_02_0049__en-us_topic_0000001231195475_p83671555815">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p id="swr_02_0049__en-us_topic_0000001231195475_p1368951588">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0049__en-us_topic_0000001231195475_row136516575817"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p336915535814">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p5370956586">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="swr_02_0049__en-us_topic_0000001231195475_p8371755584">Permission ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0049__en-us_topic_0000001231195475_row83650513588"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p1537135115812">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p6372758583">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="swr_02_0049__en-us_topic_0000001231195475_p19373653586">Image name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0049__en-us_topic_0000001231195475_row43651459587"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p837419595817">self_auth</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p1437513510588"><a href="#swr_02_0049__en-us_topic_0000001231195475_response_UserAuth">UserAuth</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="swr_02_0049__en-us_topic_0000001231195475_p6376159581">Permissions of the current user.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0049__en-us_topic_0000001231195475_row136545175814"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p8377165145819">others_auths</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p8378135175817">Array of <a href="#swr_02_0049__en-us_topic_0000001231195475_response_UserAuth">UserAuth</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="swr_02_0049__en-us_topic_0000001231195475_p103781355582">Permissions of other users.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="swr_02_0049__en-us_topic_0000001231195475_response_UserAuth"></a><a name="en-us_topic_0000001231195475_response_UserAuth"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0049__en-us_topic_0000001231195475_response_UserAuth" frame="border" border="1" rules="all"><caption><b>Table 4 </b>UserAuth</caption><thead align="left"><tr id="swr_02_0049__en-us_topic_0000001231195475_row837913512583"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="swr_02_0049__en-us_topic_0000001231195475_p438125145817">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p id="swr_02_0049__en-us_topic_0000001231195475_p2038205145815">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.4.2.4.1.3"><p id="swr_02_0049__en-us_topic_0000001231195475_p113830514585">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0049__en-us_topic_0000001231195475_row4379205205818"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p1838413512589">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p13384258581">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="swr_02_0049__en-us_topic_0000001231195475_p153851511587">User ID, which needs to be obtained from IAM.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0049__en-us_topic_0000001231195475_row1737913518584"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p16386195135818">user_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p1638745145818">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="swr_02_0049__en-us_topic_0000001231195475_p8387125125810">Username, which needs to be obtained from IAM.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0049__en-us_topic_0000001231195475_row73791556585"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p8388165155814">auth</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p173896545818">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="swr_02_0049__en-us_topic_0000001231195475_p1738911511586">User permissions. <strong id="swr_02_0049__en-us_topic_0000001231195475_b15783409894420">7</strong>: Manage. <strong id="swr_02_0049__en-us_topic_0000001231195475_b206043427894420">3</strong>: Write. <strong id="swr_02_0049__en-us_topic_0000001231195475_b94028358794420">1</strong>: Read.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0049__en-us_topic_0000001231195475_section739005175817"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="swr_02_0049__en-us_topic_0000001231195475_screen19391257581">GET https://{endpoint}/v2/manage/namespaces/{namespace}/repos/{repository}/access</pre>
|
|
</div>
|
|
<div class="section" id="swr_02_0049__en-us_topic_0000001231195475_section1839245135820"><h4 class="sectiontitle">Example Response</h4><p id="swr_02_0049__en-us_topic_0000001231195475_p1739318515584"><strong id="swr_02_0049__en-us_topic_0000001231195475_b1269303179111035">Status code: 200</strong></p>
|
|
<p id="swr_02_0049__en-us_topic_0000001231195475_p5393856585">Query succeeded.</p>
|
|
<pre class="screen" id="swr_02_0049__en-us_topic_0000001231195475_screen1339645165820">{
|
|
"id" : 1422,
|
|
"name" : "group",
|
|
"self_auth" : {
|
|
"user_id" : "3059e6b5562241fda3fa441cca6f228b",
|
|
"user_name" : "user01",
|
|
"auth" : 7
|
|
},
|
|
"others_auths" : [ {
|
|
"user_id" : "fb3f175c1fd146ab8cdae3272be6107b",
|
|
"user_name" : "user02",
|
|
"auth" : 7
|
|
} ]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="swr_02_0049__en-us_topic_0000001231195475_section1440411555818"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0049__en-us_topic_0000001231195475_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="swr_02_0049__en-us_topic_0000001231195475_row19405125145817"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="swr_02_0049__en-us_topic_0000001231195475_p174061051581">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_0049__en-us_topic_0000001231195475_p240612565816">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0049__en-us_topic_0000001231195475_row124053505810"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p1940712565820">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p124081554581">Query succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0049__en-us_topic_0000001231195475_row6405051580"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p140913525816">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p94091955585">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0049__en-us_topic_0000001231195475_row740515165820"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p641025135817">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p8411459582">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0049__en-us_topic_0000001231195475_row14058565815"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p14411657589">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p184122565818">The image was not found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0049__en-us_topic_0000001231195475_row14052565813"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0049__en-us_topic_0000001231195475_p114138565811">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0049__en-us_topic_0000001231195475_p15413135115818">Internal error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0049__en-us_topic_0000001231195475_section741415518583"><h4 class="sectiontitle">Error Codes</h4><p id="swr_02_0049__en-us_topic_0000001231195475_p74151552581">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_0091.html">Image Permission Management</a></div>
|
|
</div>
|
|
</div>
|
|
|