Description: Invokes scanning of a build that was uploaded to Artifactory as requested by a CI server.
Security: Requires the "Manage Xray Metadata" role to be set on the User or Group level.
Usage: POST /api/v2/ci/build
Consumes: application/json
Produces: application/json
Path parameters: None
Query parameters: None
Request body:
Name | Type | Required/Optional | Description |
---|---|---|---|
| string | required | Name of the build |
| string | required | Build number |
| string | optional | The project key that the build belongs to |
| boolean | optional | Flag to rescan the build |
Response body:
Name | Type | Description |
---|---|---|
| string | Information about the scan progress. |
Response codes:
Status code | Description |
---|---|
200 | Build %v is not selected for indexing |
200 | No Xray “Fail build in case of a violation” policy rule has been defined on this build. The Xray scan will run in parallel to the deployment of the build and will not obstruct the build. To review the Xray scan results, see the Xray Violations tab in the UI. |
400 | Request is missing mandatory fields |
403 | No valid license was found |
403 | Permission denied |
415 | Failed to parse scan build request |
Example request:
{ "build_name": "my-build", "build_number": "8" }
Project Scope Example request:
{ "build_name": "my-build", "build_number": "14", "project": "projA" }
Example of successful response:
{ "info": "Scan of build name 'my-build', build number '8' is in progress" }
Example error response
{ "info": "Build roni-test number 13 wasn't found in Artifactory" }