API Reference
Open Cloudsmith
DocumentationGuidesAPI Reference
  • General
    • Introduction
    • Rate Limits
    • Error Handling
  • API
    • Collapse icon
      Audit Log
      • Namespace List
        get
      • Repo List
        get
    • Collapse icon
      Broadcasts
      • Create Broadcast Token
        post
    • Collapse icon
      Deny Policy
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Update
        put
    • Collapse icon
      Distros
      • List
        get
      • Read
        get
    • Collapse icon
      Entitlements
      • Create
        post
      • Delete
        delete
      • Disable
        post
      • Enable
        post
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Refresh
        post
      • Reset
        post
      • Sync
        post
    • Collapse icon
      Files
      • Abort
        post
      • Complete
        post
      • Create
        post
      • Info
        get
      • Validate
        post
    • Collapse icon
      Formats
      • List
        get
      • Read
        get
    • Collapse icon
      Invites
      • Create
        post
      • Delete
        delete
      • Extend
        post
      • List
        get
      • Partial Update
        patch
      • Resend
        post
    • Collapse icon
      License Policy
      • Collapse icon
        Evaluation
        • Create
          post
        • List
          get
        • Read
          get
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Update
        put
    • Collapse icon
      Members
      • Collapse icon
        Update
        • Role
          patch
        • Visibility
          patch
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Refresh
        post
      • Remove
        get
    • Collapse icon
      Metrics
      • Collapse icon
        Entitlements
        • Account List
          get
        • Repo List
          get
      • Packages List
        get
    • Collapse icon
      Namespaces
      • List
        get
      • Read
        get
    • Collapse icon
      Openid Connect
      • Collapse icon
        Dynamic Mappings
        • List
          get
        • Read
          get
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Update
        put
    • Collapse icon
      Orgs
      • Delete
        delete
      • List
        get
      • Read
        get
    • Collapse icon
      Packages
      • Collapse icon
        Upload
        • Alpine
          post
        • Cargo
          post
        • Cocoapods
          post
        • Composer
          post
        • Conan
          post
        • Conda
          post
        • Cran
          post
        • Dart
          post
        • Deb
          post
        • Docker
          post
        • Go
          post
        • Helm
          post
        • Hex
          post
        • Huggingface
          post
        • Luarocks
          post
        • Maven
          post
        • Npm
          post
        • Nuget
          post
        • P2
          post
        • Python
          post
        • Raw
          post
        • Rpm
          post
        • Ruby
          post
        • Swift
          post
        • Terraform
          post
        • Vagrant
          post
      • Collapse icon
        Validate Upload
        • Alpine
          post
        • Cargo
          post
        • Cocoapods
          post
        • Composer
          post
        • Conan
          post
        • Conda
          post
        • Cran
          post
        • Dart
          post
        • Deb
          post
        • Docker
          post
        • Go
          post
        • Helm
          post
        • Hex
          post
        • Huggingface
          post
        • Luarocks
          post
        • Maven
          post
        • Npm
          post
        • Nuget
          post
        • P2
          post
        • Python
          post
        • Raw
          post
        • Rpm
          post
        • Ruby
          post
        • Swift
          post
        • Terraform
          post
        • Vagrant
          post
      • Copy
        post
      • Delete
        delete
      • Dependencies
        get
      • Groups List
        get
      • List
        get
      • Move
        post
      • Quarantine
        post
      • Read
        get
      • Resync
        post
      • Scan
        post
      • Status
        get
      • Tag
        post
      • Update License
        patch
      • Vulnerabilities Osv List
        get
    • Collapse icon
      Quota
      • Collapse icon
        Oss
        • History Read
          get
        • Read
          get
      • History Read
        get
      • Read
        get
    • Expand icon
      Repo Retention
      • Partial Update
        patch
      • Read
        get
    • Collapse icon
      Repos
      • Collapse icon
        Ecdsa
        • Create
          post
        • List
          get
        • Regenerate
          post
      • Collapse icon
        Geoip
        • Disable
          post
        • Enable
          post
        • Partial Update
          patch
        • Read
          get
        • Test
          post
        • Update
          put
      • Collapse icon
        Gpg
        • Create
          post
        • List
          get
        • Regenerate
          post
      • Collapse icon
        Privileges
        • List
          get
        • Partial Update
          patch
        • Update
          put
      • Collapse icon
        Rsa
        • Create
          post
        • List
          get
        • Regenerate
          post
      • Upstream
        • Collapse icon
          Cargo
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Composer
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Conda
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Cran
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Dart
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Deb
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Docker
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Go
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Helm
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Hex
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Huggingface
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Maven
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Npm
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Nuget
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Python
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Rpm
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Ruby
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
        • Collapse icon
          Swift
          • Create
            post
          • Delete
            delete
          • List
            get
          • Partial Update
            patch
          • Read
            get
          • Update
            put
      • Collapse icon
        X509
        • Ecdsa List
          get
        • Rsa List
          get
      • Create
        post
      • Delete
        delete
      • Namespace List
        get
      • Partial Update
        patch
      • Read
        get
      • Transfer Region
        post
      • User List
        get
    • Collapse icon
      Saml Authentication
      • Partial Update
        patch
      • Read
        get
    • Collapse icon
      Saml Group Sync
      • Create
        post
      • Delete
        delete
      • Disable
        post
      • Enable
        post
      • List
        get
      • Status
        get
    • Collapse icon
      Services
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Refresh
        post
    • Collapse icon
      Storage Regions
      • List
        get
      • Read
        get
    • Collapse icon
      Teams
      • Collapse icon
        Members
        • Create
          post
        • List
          get
        • Update
          put
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
    • Collapse icon
      User
      • Collapse icon
        Tokens
        • Create
          post
        • List
          get
        • Refresh
          put
      • Self
        get
      • Token Create
        post
    • Collapse icon
      Vulnerabilities
      • Namespace List
        get
      • Package List
        get
      • Read
        get
      • Repo List
        get
    • Collapse icon
      Vulnerability Policy
      • Collapse icon
        Evaluation
        • Create
          post
        • List
          get
        • Read
          get
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
      • Update
        put
    • Collapse icon
      Webhooks
      • Create
        post
      • Delete
        delete
      • List
        get
      • Partial Update
        patch
      • Read
        get
    • Collapse icon
      Workspaces Policies
      • Collapse icon
        Actions
        • Create
          post
        • Destroy
          delete
        • List
          get
        • Partial Update
          patch
        • Retrieve
          get
        • Update
          put
      • Create
        post
      • Decision Logs List
        get
      • Destroy
        delete
      • List
        get
      • Partial Update
        patch
      • Retrieve
        get
      • Simulate List
        get
      • Update
        put
    • Api Repos Geoip Status
      get
    • Badges Version List
      get
    • License Policy Violation List
      get
    • Rates Limits List
      get
    • Status Check Basic
      get
    • Users Profile Read
      get
    • Vulnerability Policy Violation List
      get

Retention

Repo Retention Partial Update

Update the retention rules for the repository.

Request

patchhttps://api.cloudsmith.io/v1/repos/{owner}/{repo}/retention
Body params optional

Response body

object

object

retention_count_limit
integer
optional
length ≤ 10000

The maximum X number of packages to retain.

retention_days_limit
integer
optional
length ≤ 180

The X number of days of packages to retain.

retention_enabled
boolean
optional

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.

retention_group_by_format
boolean
optional

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.

retention_group_by_name
boolean
optional

If checked, retention will apply to groups of packages by name rather than all packages.<br>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.

retention_group_by_package_type
boolean
optional

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. <br>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.

retention_package_query_string
string | null
optional

A package search expression which, if provided, filters the packages to be deleted.<br>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.<br>Refer to the Cloudsmith documentation for package query syntax.

retention_size_limit
integer
optional
length ≤ 21474836480

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

Response

Responses

Updated the retention rules for the repository.

object

object

retention_count_limit
integer
optional
length ≤ 10000

The maximum X number of packages to retain.

retention_days_limit
integer
optional
length ≤ 180

The X number of days of packages to retain.

retention_enabled
boolean
optional

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.

retention_group_by_format
boolean
optional

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.

retention_group_by_name
boolean
optional

If checked, retention will apply to groups of packages by name rather than all packages.<br>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.

retention_group_by_package_type
boolean
optional

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. <br>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.

retention_package_query_string
string | null
optional

A package search expression which, if provided, filters the packages to be deleted.<br>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.<br>Refer to the Cloudsmith documentation for package query syntax.

retention_size_limit
integer
optional
length ≤ 21474836480

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

Request could not be processed (see detail).

object

object

detail
string
required
length ≥ 1

An extended message for the response.

fields
object
optional

A Dictionary of related errors where key: Field and value: Array of Errors related to that field

object

Owner namespace or repository not found

object

object

detail
string
required
length ≥ 1

An extended message for the response.

fields
object
optional

A Dictionary of related errors where key: Field and value: Array of Errors related to that field

object

Missing or invalid parameters (see detail).

object

object

detail
string
required
length ≥ 1

An extended message for the response.

fields
object
optional

A Dictionary of related errors where key: Field and value: Array of Errors related to that field

object