Files
doc-exports/docs/swr/api-ref/swr_02_0118.html
qiujiandong1 73ffc816f4 SWR API 20250521 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com>
Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
2025-10-29 10:18:41 +00:00

268 lines
24 KiB
HTML

<a name="swr_02_0118"></a><a name="swr_02_0118"></a>
<h1 class="topictitle1">Creating an Image Retention Policy</h1>
<div id="body8662426"><div class="section" id="swr_02_0118__en-us_topic_0000001230995423_section142031530193418"><h4 class="sectiontitle">Description</h4><p id="swr_02_0118__en-us_topic_0000001230995423_p6203230173413">Create an image retention policy.</p>
</div>
<div class="section" id="swr_02_0118__en-us_topic_0000001230995423_section1720483053420"><h4 class="sectiontitle">Constraints</h4><p id="swr_02_0118__en-us_topic_0000001230995423_p16204130123418">None</p>
</div>
<div class="section" id="swr_02_0118__en-us_topic_0000001230995423_section1720623033416"><h4 class="sectiontitle">URI</h4><p id="swr_02_0118__en-us_topic_0000001230995423_p220733012344">POST /v2/manage/namespaces/{namespace}/repos/{repository}/retentions</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0118__en-us_topic_0000001230995423_table6209113014344" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="swr_02_0118__en-us_topic_0000001230995423_row19208830193415"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="swr_02_0118__en-us_topic_0000001230995423_p1820973014348">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_0118__en-us_topic_0000001230995423_p142105309341">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_0118__en-us_topic_0000001230995423_p9210330153416">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_0118__en-us_topic_0000001230995423_p142111930203410">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0118__en-us_topic_0000001230995423_row2020814304344"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p4212183013418">namespace</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p721213018349">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p8213183014345">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0118__en-us_topic_0000001230995423_p152131230163410">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_0118__en-us_topic_0000001230995423_row1220811304345"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p2214630173413">repository</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p52144307341">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p321453043416">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0118__en-us_topic_0000001230995423_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_0118__en-us_topic_0000001230995423_section621643015348"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0118__en-us_topic_0000001230995423_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="swr_02_0118__en-us_topic_0000001230995423_row192171330163413"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="swr_02_0118__en-us_topic_0000001230995423_p621883033416">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_0118__en-us_topic_0000001230995423_p5218113093410">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_0118__en-us_topic_0000001230995423_p421919308348">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_0118__en-us_topic_0000001230995423_p1421993019346">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0118__en-us_topic_0000001230995423_row4217230123415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p622015300349">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p15220430113416">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p0221203063413">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0118__en-us_topic_0000001230995423_p92211130203412">Message body type (format). The value can be <strong id="swr_02_0118__en-us_topic_0000001230995423_b7352153620213">application/json</strong> or <strong id="swr_02_0118__en-us_topic_0000001230995423_b1935216362211">charset=utf-8 application/json</strong>.</p>
<p id="swr_02_0118__en-us_topic_0000001230995423_p1922112305343">Default value: <strong id="swr_02_0118__en-us_topic_0000001230995423_b410203917220">application/json</strong></p>
</td>
</tr>
<tr id="swr_02_0118__en-us_topic_0000001230995423_row6217930183415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p62221430173419">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_0118__en-us_topic_0000001230995423_p822315300340">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p1922353003411">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0118__en-us_topic_0000001230995423_p32231330113419">User token.</p>
<p id="swr_02_0118__en-us_topic_0000001230995423_p8224193014348">The token can be obtained by calling the IAM API used to obtain a user token. The value of <strong id="swr_02_0118__en-us_topic_0000001230995423_b19139705011928">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_0118__en-us_topic_0000001230995423_request_CreateRetentionRequestBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="swr_02_0118__en-us_topic_0000001230995423_row62252304348"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="swr_02_0118__en-us_topic_0000001230995423_p18227330193415">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="swr_02_0118__en-us_topic_0000001230995423_p1223053013341">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="swr_02_0118__en-us_topic_0000001230995423_p1123013073419">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="swr_02_0118__en-us_topic_0000001230995423_p11231133013341">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0118__en-us_topic_0000001230995423_row1822593023411"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p15232163093414">algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p4232183053418">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p13233143083415">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="swr_02_0118__en-us_topic_0000001230995423_p523419302348">Retention policy matching rule. The value is <strong id="swr_02_0118__en-us_topic_0000001230995423_b163461617195116">or</strong>.</p>
</td>
</tr>
<tr id="swr_02_0118__en-us_topic_0000001230995423_row19225113015341"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p12341301346">rules</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p62351330103412">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p2235230183416">Array of <a href="#swr_02_0118__en-us_topic_0000001230995423_request_Rule">Rule</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="swr_02_0118__en-us_topic_0000001230995423_p523612300344">Image retention policy.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="swr_02_0118__en-us_topic_0000001230995423_request_Rule"></a><a name="en-us_topic_0000001230995423_request_Rule"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0118__en-us_topic_0000001230995423_request_Rule" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Rule</caption><thead align="left"><tr id="swr_02_0118__en-us_topic_0000001230995423_row4237430103415"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p id="swr_02_0118__en-us_topic_0000001230995423_p723923016348">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.2"><p id="swr_02_0118__en-us_topic_0000001230995423_p523973019344">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.3"><p id="swr_02_0118__en-us_topic_0000001230995423_p124011305346">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.4.2.5.1.4"><p id="swr_02_0118__en-us_topic_0000001230995423_p1124063033415">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0118__en-us_topic_0000001230995423_row13237143018342"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p62416307347">template</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p72419309343">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p1024293073417">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0118__en-us_topic_0000001230995423_p182431530183416">Retention policy type. The value can be <strong id="swr_02_0118__en-us_topic_0000001230995423_b160528755104427">date_rule</strong> and <strong id="swr_02_0118__en-us_topic_0000001230995423_b499819562104427">tag_rule</strong>.</p>
</td>
</tr>
<tr id="swr_02_0118__en-us_topic_0000001230995423_row1923810307344"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p1924412307347">params</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p10245230173415">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p13246630123412">Object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0118__en-us_topic_0000001230995423_p424753093416">If <strong id="swr_02_0118__en-us_topic_0000001230995423_b12388471531">template</strong> is set to <strong id="swr_02_0118__en-us_topic_0000001230995423_b1276211015529">date_rule</strong>, set <strong id="swr_02_0118__en-us_topic_0000001230995423_b1724719152526">params</strong> to <strong id="swr_02_0118__en-us_topic_0000001230995423_b1171162655213">{"days": "xxx"}</strong>. If <strong id="swr_02_0118__en-us_topic_0000001230995423_b14912111012538">template</strong> is set to <strong id="swr_02_0118__en-us_topic_0000001230995423_b173761433115211">tag_rule</strong>, set <strong id="swr_02_0118__en-us_topic_0000001230995423_b11656858125210">params</strong> to <strong id="swr_02_0118__en-us_topic_0000001230995423_b160617391528">{"num": "xxx"}</strong>.</p>
</td>
</tr>
<tr id="swr_02_0118__en-us_topic_0000001230995423_row13238193016344"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p924713033416">tag_selectors</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p14248330103417">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p5248930133419">Array of <a href="#swr_02_0118__en-us_topic_0000001230995423_request_TagSelector">TagSelector</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="swr_02_0118__en-us_topic_0000001230995423_p9249193003419">Exception images.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="swr_02_0118__en-us_topic_0000001230995423_request_TagSelector"></a><a name="en-us_topic_0000001230995423_request_TagSelector"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0118__en-us_topic_0000001230995423_request_TagSelector" frame="border" border="1" rules="all"><caption><b>Table 5 </b>TagSelector</caption><thead align="left"><tr id="swr_02_0118__en-us_topic_0000001230995423_row4250230163419"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.1"><p id="swr_02_0118__en-us_topic_0000001230995423_p16251193019340">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.2"><p id="swr_02_0118__en-us_topic_0000001230995423_p1125114307348">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.5.1.3"><p id="swr_02_0118__en-us_topic_0000001230995423_p1625214307349">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.5.2.5.1.4"><p id="swr_02_0118__en-us_topic_0000001230995423_p72521430113412">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0118__en-us_topic_0000001230995423_row10250183033418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p925333073415">kind</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p15253153063414">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p1825412302343">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.5.2.5.1.4 "><p id="swr_02_0118__en-us_topic_0000001230995423_p7254330143417">Matching rule. The value can be <strong id="swr_02_0118__en-us_topic_0000001230995423_b1589817716104427">label</strong> or <strong id="swr_02_0118__en-us_topic_0000001230995423_b266147311104427">regexp</strong>.</p>
</td>
</tr>
<tr id="swr_02_0118__en-us_topic_0000001230995423_row92501330123418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p1025473012344">pattern</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p1325517306341">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.5.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p132571830113413">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.5.2.5.1.4 "><p id="swr_02_0118__en-us_topic_0000001230995423_p1825853073416">If <strong id="swr_02_0118__en-us_topic_0000001230995423_b1778874841614">kind</strong> is set to <strong id="swr_02_0118__en-us_topic_0000001230995423_b18719061718">label</strong>, set this parameter to the image tag. If <strong id="swr_02_0118__en-us_topic_0000001230995423_b7453111071711">kind</strong> is set to <strong id="swr_02_0118__en-us_topic_0000001230995423_b1471120111716">regexp</strong>, set this parameter to a regular expression.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="swr_02_0118__en-us_topic_0000001230995423_section1825873063419"><h4 class="sectiontitle">Response Parameters</h4><p id="swr_02_0118__en-us_topic_0000001230995423_p1125833013411"><strong id="swr_02_0118__en-us_topic_0000001230995423_b1839517361176">Status code: 201</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0118__en-us_topic_0000001230995423_response_CreateRetentionResp" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameter</caption><thead align="left"><tr id="swr_02_0118__en-us_topic_0000001230995423_row525918307349"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="swr_02_0118__en-us_topic_0000001230995423_p1226153010341">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_0118__en-us_topic_0000001230995423_p02614305345">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_0118__en-us_topic_0000001230995423_p12262183043416">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0118__en-us_topic_0000001230995423_row192592030183417"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p6263130193419">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p926318304345">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="swr_02_0118__en-us_topic_0000001230995423_p1264203013415">Image retention policy ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="swr_02_0118__en-us_topic_0000001230995423_section1926513302345"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="swr_02_0118__en-us_topic_0000001230995423_screen182661530193415">POST https://{endpoint}/v2/manage/namespaces/{namespace}/repos/{repository}/retentions
{
"algorithm" : "string",
"rules" : [ {
"params" : { },
"tag_selectors" : [ {
"kind" : "string",
"pattern" : "string"
} ],
"template" : "string"
} ]
}</pre>
</div>
<div class="section" id="swr_02_0118__en-us_topic_0000001230995423_section527233016348"><h4 class="sectiontitle">Example Response</h4><p id="swr_02_0118__en-us_topic_0000001230995423_p14272130163415"><strong id="swr_02_0118__en-us_topic_0000001230995423_b599549101714">Status code: 201</strong></p>
<p id="swr_02_0118__en-us_topic_0000001230995423_p627420306348">Creation succeeded.</p>
<pre class="screen" id="swr_02_0118__en-us_topic_0000001230995423_screen1275133016343">{
"id" : 34
}</pre>
</div>
<div class="section" id="swr_02_0118__en-us_topic_0000001230995423_section978116306340"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0118__en-us_topic_0000001230995423_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="swr_02_0118__en-us_topic_0000001230995423_row11355133093415"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="swr_02_0118__en-us_topic_0000001230995423_p1278163015345">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_0118__en-us_topic_0000001230995423_p778117302343">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="swr_02_0118__en-us_topic_0000001230995423_row3355173014344"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p77812030183410">201</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p147812030163416">Creation succeeded.</p>
</td>
</tr>
<tr id="swr_02_0118__en-us_topic_0000001230995423_row8355193063414"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p187821830203417">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p10782430183420">Request error.</p>
</td>
</tr>
<tr id="swr_02_0118__en-us_topic_0000001230995423_row4355030153415"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p478293073411">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p578223093411">Authentication failed.</p>
</td>
</tr>
<tr id="swr_02_0118__en-us_topic_0000001230995423_row1335519306345"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p3782730163415">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p18782153014344">The organization or repository was not found.</p>
</td>
</tr>
<tr id="swr_02_0118__en-us_topic_0000001230995423_row5355133012341"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0118__en-us_topic_0000001230995423_p18783123019343">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0118__en-us_topic_0000001230995423_p478393013418">Internal error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="swr_02_0118__en-us_topic_0000001230995423_section4783103013346"><h4 class="sectiontitle">Error Codes</h4><p id="swr_02_0118__en-us_topic_0000001230995423_p17836303349">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>