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>
270 lines
24 KiB
HTML
270 lines
24 KiB
HTML
<a name="swr_02_0053"></a><a name="swr_02_0053"></a>
|
|
|
|
<h1 class="topictitle1">Querying Image Retention Policies</h1>
|
|
<div id="body8662426"><div class="section" id="swr_02_0053__en-us_topic_0000001231195479_section22021343152511"><h4 class="sectiontitle">Description</h4><p id="swr_02_0053__en-us_topic_0000001231195479_p12021943132518">Query image retention policies.</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0053__en-us_topic_0000001231195479_section220264314250"><h4 class="sectiontitle">Constraints</h4><p id="swr_02_0053__en-us_topic_0000001231195479_p142022437256">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0053__en-us_topic_0000001231195479_section1020310432255"><h4 class="sectiontitle">URI</h4><p id="swr_02_0053__en-us_topic_0000001231195479_p9203543112518">GET /v2/manage/namespaces/{namespace}/repos/{repository}/retentions</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0053__en-us_topic_0000001231195479_table4204134392519" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="swr_02_0053__en-us_topic_0000001231195479_row122031943132514"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="swr_02_0053__en-us_topic_0000001231195479_p420434315251">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_0053__en-us_topic_0000001231195479_p17204114352512">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_0053__en-us_topic_0000001231195479_p5205114317255">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_0053__en-us_topic_0000001231195479_p0205943172513">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0053__en-us_topic_0000001231195479_row920413434255"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p320511434259">namespace</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p1420513435257">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p192055431257">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0053__en-us_topic_0000001231195479_p11205943132510">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_0053__en-us_topic_0000001231195479_row132041431257"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p10205154313252">repository</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p1720674320251">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p62061343202518">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0053__en-us_topic_0000001231195479_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_0053__en-us_topic_0000001231195479_section15206164310253"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0053__en-us_topic_0000001231195479_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="swr_02_0053__en-us_topic_0000001231195479_row16206743152514"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="swr_02_0053__en-us_topic_0000001231195479_p2020724318250">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_0053__en-us_topic_0000001231195479_p20207104342511">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_0053__en-us_topic_0000001231195479_p1020813436257">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_0053__en-us_topic_0000001231195479_p172081743182520">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0053__en-us_topic_0000001231195479_row820754312510"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p1208194342519">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p20208243112515">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p182081143122516">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0053__en-us_topic_0000001231195479_p620864312516">Message body type (format). The value can be <strong id="swr_02_0053__en-us_topic_0000001231195479_b169020437215">application/json</strong> or <strong id="swr_02_0053__en-us_topic_0000001231195479_b79025439220">charset=utf-8 application/json</strong>.</p>
|
|
<p id="swr_02_0053__en-us_topic_0000001231195479_p4208343162510">Default value: <strong id="swr_02_0053__en-us_topic_0000001231195479_b493415451328">application/json</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0053__en-us_topic_0000001231195479_row220720431257"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p18208843152519">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_0053__en-us_topic_0000001231195479_p12091543102512">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p6209124322520">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0053__en-us_topic_0000001231195479_p6209164311252">User token.</p>
|
|
<p id="swr_02_0053__en-us_topic_0000001231195479_p520919433256">The token can be obtained by calling an IAM API. The value of <strong id="swr_02_0053__en-us_topic_0000001231195479_b18429142116272">X-Subject-Token</strong> in the response header is the user token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="note" id="swr_02_0053__en-us_topic_0000001231195479_note1052431917212"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="swr_02_0053__en-us_topic_0000001231195479_p1452410197212">By default, 100 records will be returned.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="swr_02_0053__en-us_topic_0000001231195479_section152091443122515"><h4 class="sectiontitle">Response Parameters</h4><p id="swr_02_0053__en-us_topic_0000001231195479_p920918435251"><strong id="swr_02_0053__en-us_topic_0000001231195479_b2105128926111043">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0053__en-us_topic_0000001231195479_response_ResponseParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameter</caption><thead align="left"><tr id="swr_02_0053__en-us_topic_0000001231195479_row5209194317259"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="swr_02_0053__en-us_topic_0000001231195479_p18210143112513">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_0053__en-us_topic_0000001231195479_p521014433254">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_0053__en-us_topic_0000001231195479_p192100435255">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0053__en-us_topic_0000001231195479_row8209134392512"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p15210134312511">[items]</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p4210543172513">Array of <a href="#swr_02_0053__en-us_topic_0000001231195479_response_Retention">Retention</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p12211843132520">Query succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="swr_02_0053__en-us_topic_0000001231195479_response_Retention"></a><a name="en-us_topic_0000001231195479_response_Retention"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0053__en-us_topic_0000001231195479_response_Retention" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Retention</caption><thead align="left"><tr id="swr_02_0053__en-us_topic_0000001231195479_row1721264318252"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="swr_02_0053__en-us_topic_0000001231195479_p192130431253">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_0053__en-us_topic_0000001231195479_p321354332515">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_0053__en-us_topic_0000001231195479_p3213143112519">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0053__en-us_topic_0000001231195479_row1221224312519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p17213843142515">algorithm</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p11213144319253">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p18213343112510">Retention policy matching rule. The value is <strong id="swr_02_0053__en-us_topic_0000001231195479_b2090791493104357">or</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0053__en-us_topic_0000001231195479_row11212843192519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p4213443182512">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p16214143132514">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p1121411438255">ID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0053__en-us_topic_0000001231195479_row42126436252"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p19214154317253">rules</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p1421444352514">Array of <a href="#swr_02_0053__en-us_topic_0000001231195479_response_Rule">Rule</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p10214543102510">Image retention policy.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0053__en-us_topic_0000001231195479_row15212343122516"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p1721474372511">scope</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p17214104311251">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p1221544362515">Reserved field.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="swr_02_0053__en-us_topic_0000001231195479_response_Rule"></a><a name="en-us_topic_0000001231195479_response_Rule"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0053__en-us_topic_0000001231195479_response_Rule" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Rule</caption><thead align="left"><tr id="swr_02_0053__en-us_topic_0000001231195479_row19215164320258"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.1"><p id="swr_02_0053__en-us_topic_0000001231195479_p192171143132510">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.2"><p id="swr_02_0053__en-us_topic_0000001231195479_p4217204312259">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.5.2.4.1.3"><p id="swr_02_0053__en-us_topic_0000001231195479_p1921714372513">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0053__en-us_topic_0000001231195479_row62161843182519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p1621719432257">template</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p02171243152519">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p7217543192511">Retention policy type. The value can be <strong id="swr_02_0053__en-us_topic_0000001231195479_b894513628115158">date_rule</strong> and <strong id="swr_02_0053__en-us_topic_0000001231195479_b2143787111115158">tag_rule</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0053__en-us_topic_0000001231195479_row121694372518"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p14217943202519">params</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p721814392511">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p132181543142513">If <strong id="swr_02_0053__en-us_topic_0000001231195479_b19803829813353">template</strong> is set to <strong id="swr_02_0053__en-us_topic_0000001231195479_b170691517213353">date_rule</strong>, set <strong id="swr_02_0053__en-us_topic_0000001231195479_b94528173913353">params</strong> to <strong id="swr_02_0053__en-us_topic_0000001231195479_b154403786013353">{"days": "xxx"}</strong>. If <strong id="swr_02_0053__en-us_topic_0000001231195479_b96838668413353">template</strong> is set to <strong id="swr_02_0053__en-us_topic_0000001231195479_b93324402613353">tag_rule</strong>, set <strong id="swr_02_0053__en-us_topic_0000001231195479_b82465018313353">params</strong> to <strong id="swr_02_0053__en-us_topic_0000001231195479_b74848998613353">{"num": "xxx"}</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0053__en-us_topic_0000001231195479_row20216104312510"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p6218443172510">tag_selectors</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p15218124320259">Array of <a href="#swr_02_0053__en-us_topic_0000001231195479_response_TagSelector">TagSelector</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p4218943172517">Exception images.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="swr_02_0053__en-us_topic_0000001231195479_response_TagSelector"></a><a name="en-us_topic_0000001231195479_response_TagSelector"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0053__en-us_topic_0000001231195479_response_TagSelector" frame="border" border="1" rules="all"><caption><b>Table 6 </b>TagSelector</caption><thead align="left"><tr id="swr_02_0053__en-us_topic_0000001231195479_row102181843162516"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.1"><p id="swr_02_0053__en-us_topic_0000001231195479_p1321984318257">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.2"><p id="swr_02_0053__en-us_topic_0000001231195479_p022094318252">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.6.2.4.1.3"><p id="swr_02_0053__en-us_topic_0000001231195479_p1622014313257">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0053__en-us_topic_0000001231195479_row18219154352515"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p18220443112511">kind</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p0220154382515">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p2220843122514">Matching rule. The value can be <strong id="swr_02_0053__en-us_topic_0000001231195479_b148396713731634">label</strong> or <strong id="swr_02_0053__en-us_topic_0000001231195479_b99847559631634">regexp</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0053__en-us_topic_0000001231195479_row82191943172520"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p622114434254">pattern</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p82218439259">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="swr_02_0053__en-us_topic_0000001231195479_p10221194362516">If <strong id="swr_02_0053__en-us_topic_0000001231195479_b70395575231728">kind</strong> is set to <strong id="swr_02_0053__en-us_topic_0000001231195479_b30642067431728">label</strong>, set this parameter to the image tag. If <strong id="swr_02_0053__en-us_topic_0000001231195479_b8812896731728">kind</strong> is set to <strong id="swr_02_0053__en-us_topic_0000001231195479_b58054019631728">regexp</strong>, set this parameter to a regular expression.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0053__en-us_topic_0000001231195479_section11221943172513"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="swr_02_0053__en-us_topic_0000001231195479_screen7221154312255">GET https://{endpoint}/v2/manage/namespaces/{namespace}/repos/{repository}/retentions</pre>
|
|
</div>
|
|
<div class="section" id="swr_02_0053__en-us_topic_0000001231195479_section16221144312517"><h4 class="sectiontitle">Example Response</h4><p id="swr_02_0053__en-us_topic_0000001231195479_p822254382516"><strong id="swr_02_0053__en-us_topic_0000001231195479_b2045315295111043">Status code: 200</strong></p>
|
|
<p id="swr_02_0053__en-us_topic_0000001231195479_p102222043142519">Query succeeded.</p>
|
|
<pre class="screen" id="swr_02_0053__en-us_topic_0000001231195479_screen15223174342516">[ {
|
|
"algorithm" : "or",
|
|
"id" : 222,
|
|
"rules" : [ {
|
|
"params" : {
|
|
"days" : "30"
|
|
},
|
|
"tag_selectors" : [ {
|
|
"kind" : "label",
|
|
"pattern" : "v5"
|
|
}, {
|
|
"kind" : "label",
|
|
"pattern" : "1.0.1"
|
|
}, {
|
|
"kind" : "regexp",
|
|
"pattern" : "^123$"
|
|
} ],
|
|
"template" : "date_rule"
|
|
} ],
|
|
"scope" : ""
|
|
} ]</pre>
|
|
</div>
|
|
<div class="section" id="swr_02_0053__en-us_topic_0000001231195479_section17225343152518"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0053__en-us_topic_0000001231195479_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="swr_02_0053__en-us_topic_0000001231195479_row4225184362517"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="swr_02_0053__en-us_topic_0000001231195479_p822624319255">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_0053__en-us_topic_0000001231195479_p1222604314253">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0053__en-us_topic_0000001231195479_row0225443152511"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p7226174314256">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p11227184382519">Query succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0053__en-us_topic_0000001231195479_row6225164322517"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p5227134372513">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p12227443172512">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0053__en-us_topic_0000001231195479_row7226184314252"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p322794312515">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p322734392515">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0053__en-us_topic_0000001231195479_row522604302511"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p11228943182511">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p7228104362510">The organization or repository was not found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0053__en-us_topic_0000001231195479_row622694315258"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0053__en-us_topic_0000001231195479_p17228343142520">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0053__en-us_topic_0000001231195479_p102288438251">Internal error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0053__en-us_topic_0000001231195479_section17229144314254"><h4 class="sectiontitle">Error Codes</h4><p id="swr_02_0053__en-us_topic_0000001231195479_p822984319252">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_0094.html">Image Retention Policy Management</a></div>
|
|
</div>
|
|
</div>
|
|
|