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

# Cancel Repository Advanced Scan

Cancels a running advanced repository scan. Only artifacts in pending status will be canceled; already-scanned artifacts retain their results. Requires the Manage Xray Metadata permission. Since Xray 3.73.

# 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/v1/repository/advancedScan/{id}/cancelScan": {
      "post": {
        "operationId": "abort-a-running-repository-scan",
        "summary": "Cancel Repository Advanced Scan",
        "description": "Cancels a running advanced repository scan. Only artifacts in pending status will be canceled; already-scanned artifacts retain their results. Requires the Manage Xray Metadata permission. Since Xray 3.73.",
        "tags": [
          "Scanning V1"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The scan ID returned by the advanced scan endpoint."
          }
        ],
        "responses": {
          "200": {
            "description": "Scan canceled successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "info": {
                      "type": "string",
                      "description": "Status message."
                    }
                  }
                },
                "example": {
                  "info": "Scan was canceled successfully"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Scan ID not found",
            "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 V1",
      "description": "APIs from Scanning V1"
    }
  ]
}
```