---
updatedAt: 2026-07-26T12:31:37.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/security/llms.txt
---

# Scan Build V2

Triggers a CI build scan (v2 API). Invokes scanning of a build that was uploaded to Artifactory as requested by a CI server. Requires the Manage Xray Metadata permission.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Xray REST APIs",
    "description": "Combined JFrog Xray REST API specification (all endpoints).",
    "version": "3.140"
  },
  "servers": [
    {
      "url": "https://jf.example.com/xray",
      "description": "JFrog Platform (Xray)"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/api/v2/ci/build": {
      "post": {
        "operationId": "scan-build-v2",
        "summary": "Scan Build V2",
        "description": "Triggers a CI build scan (v2 API). Invokes scanning of a build that was uploaded to Artifactory as requested by a CI server. Requires the Manage Xray Metadata permission.",
        "tags": [
          "Scanning V2"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "build_name": {
                    "type": "string",
                    "description": "Name of the build."
                  },
                  "build_number": {
                    "type": "string",
                    "description": "Build number."
                  },
                  "project": {
                    "type": "string",
                    "description": "Project key the build belongs to."
                  },
                  "rescan": {
                    "type": "boolean",
                    "description": "Flag to rescan the build."
                  }
                },
                "required": [
                  "build_name",
                  "build_number"
                ]
              },
              "example": {
                "build_name": "my-build",
                "build_number": "8"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Build scan initiated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "info": {
                      "type": "string",
                      "description": "Status message about the scan progress."
                    }
                  }
                },
                "example": {
                  "info": "“Scan of build name 'my-build', build number '8' is in progress”"
                }
              }
            }
          },
          "400": {
            "description": "Request is missing mandatory fields",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "415": {
            "description": "Failed to parse scan build request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Basic authentication using username/password or API key"
      }
    }
  },
  "tags": [
    {
      "name": "Scanning V2",
      "description": "APIs from Scanning V2"
    }
  ]
}
```