Update the retention rules for the repository.

Update the retention rules for the repository.

Path Params
string
required
string
required
Body Params
integer
0 to 10000

The maximum X number of packages to retain.

integer
0 to 180

The X number of days of packages to retain.

boolean

If checked, the retention lifecycle rules will be activated for the repository. Any packages that don't match will be deleted automatically, and the rest are retained.

boolean

If checked, retention will apply to packages by package formats rather than across all package formats.For example, when retaining by a limit of 1 and you upload PythonPkg 1.0 and RubyPkg 1.0, no packages are deleted because they are different formats.

boolean

If checked, retention will apply to groups of packages by name rather than all packages.
For example, when retaining by a limit of 1 and you upload PkgA 1.0, PkgB 1.0 and PkgB 1.1; only PkgB 1.0 is deleted because there are two (2) PkgBs and one (1) PkgA.

boolean

If checked, retention will apply to packages by package type (e.g. by binary, by source, etc.), rather than across all package types for one or more formats.
For example, when retaining by a limit of 1 and you upload DebPackage 1.0 and DebSourcePackage 1.0, no packages are deleted because they are different package types, binary and source respectively.

string | null

A package search expression which, if provided, filters the packages to be deleted.
For example, a search expression of name:foo will result in only packages called 'foo' being deleted, or a search expression of tag:~latest will prevent any packages tagged 'latest' from being deleted.
Refer to the Cloudsmith documentation for package query syntax.

integer
0 to 21474836480

The maximum X total size (in bytes) of packages to retain.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json

Cloudsmith is the new standard in Package / Artifact Management and Software Distribution

With support for all major package formats, you can trust us to manage your software supply chain.


Start My Free Trial Now
Cookie Declaration (Manage Cookies)