Description: Enables you to index resources on-demand.
Security:Requires an Admin user.
Note: When you trigger a scan using the Scan Now API, the resource is indexed and scanned; however, the scan results will not be displayed in the Xray UI (neither in the Artifact View nor in the Scan List View). The scan results can only be retrieved programmatically using the Summary REST API, depending on the type of resource scanned: Build Info Summary API or Artifact Summary API
Usage: POST /xray/api/v2/index
Note: Not supported for Builds.
Sample Request
{
"repo_path":"local-maven-repo/org/jenkins-ci/main/jenkins-war/2.289.1/jenkins-war-2.289.1.war"
}Sample Response
{
"sent_to_reindex": {
"artifacts": [
{
"repository": "local-maven-repo",
"path": "org/jenkins-ci/main/jenkins-war/2.289.1/jenkins-war-2.289.1.war"
}
]
}
}Response Codes:
200-Success
400- Failure