Description: Removes builds stored in Artifactory. Useful for cleaning up old build info data.
If the artifacts parameter is evaluated as 1 (0/false by default), build artifacts are also removed provided they have the corresponding build.name
and build.number
properties attached to them.
If the deleteAll
parameter is evaluated as 1 (0/false by default), the whole build is removed.
Notes: Requires Artifactory Pro
Security: Requires a privileged user. From version 6.6, requires delete permission for the Build.
Produces: application/text
Usage 1 (since 6.13): to delete multiple build numbers of a certain build. This includes build numbers containing special characters.
Consumes: application/json
POST /api/build/delete
POST /api/build/delete -H "Content-type: application/json" { "project": "catalina", // optional "buildName": "test", "buildNumbers": ["build1", "build2"], "deleteArtifacts": <true | false>, // default false "deleteAll": <true | false>, // default false }
Note
If a project
is not specified, the default project is used.
Usage 2 (since 2.3.0; artifact removal since 2.3.3):
DELETE /api/build/{buildName}[?buildNumbers=n1[,n2]][&artifacts=0/1][&deleteAll=0/1]
DELETE /api/build/my-build?buildNumbers=51,52,55&artifacts=1 The following builds has been deleted successfully: 'my-build#51', 'my-build#52', 'my-build#55'. DELETE /api/build/my-build?deleteAll=1 All 'my-build' builds have been deleted successfully.