Create Build Cleanup Policy

This API is called to create a new build cleanup policy. Build Cleanup Policies APIs are supported on Artifactory version 7.125 and later.

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

A unique identifier for the cleanup policy. A minimum of three characters is required, including letters, numbers, underscore and hyphen.

Body Params
string
required

A unique identifier for the cleanup policy. A minimum of three characters is required, including letters, numbers, underscore and hyphen.

string
length ≤ 256

A brief description of the cleanup policy.

string

A cron expression specifying when the cleanup job will run. This parameter is not mandatory, however if left empty the policy will not run automatically and can only be triggered manually.

string

This key is obtained from the Project Settings screen. This parameter is used only for project-level cleanup policies.

string
enum
required

The type of items to clean up (build). This field is required.

Allowed:
integer

The maximum duration (in minutes) for policy execution, after which the policy will stop running even if not completed.

boolean

Indicates if the cleanup policy is active (true) or disabled (false). A cleanup policy must be created inactive.

boolean

Deletes the artifacts associated with the build (true to delete).

boolean

A true value means that when this policy is executed, builds will be permanently deleted. false means that when the policy is executed builds will be deleted to the Trash Can.

searchCriteria
object
required
Responses

Language
Credentials
:
URL
LoadingLoading…
Response
Choose an example:
application/json