Control Build Retention

Specifies retention parameters for build info. Note that setting build retention does not immediately delete any builds. Requires Artifactory Pro.

Security: Requires delete permission for the build.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
length ≥ 1

Build name

Query Params
boolean
Defaults to true

Controls how the endpoint responds. When true, returns immediately and operation proceeds in background. When false, waits for completion unless build.retention.always.async is set to true.

Body Params

Build retention parameters

boolean

When true, automatically removes build artifacts stored in Artifactory

integer

The maximum number of builds to store in Artifactory

date-time

Earliest build date to store in Artifactory - ISO8601 (yyyy-MM-dd'T'HH:mm:ss.SSSZ)

buildNumbersNotToBeDiscarded
array of strings

List of build numbers that should not be removed from Artifactory

buildNumbersNotToBeDiscarded
Responses
200

Build retention configured successfully

400

Bad Request - The request body is malformed or a required parameter is missing.

401

Bad Credentials - Authentication failed. A valid token is required.

403

Permission Denied - The user does not have delete permission for the build.

404

Not Found - The specified build does not exist.

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!