# Scans#UpdateScan

Update an existing Security Test Scan

Endpoint: PUT /sto/api/v2/scans/{id}
Version: 1.0
Security: 

## Query parameters:

  - `accountId` (string, required)
    Harness Account ID
    Example: "abcdef1234567890ghijkl"

## Path parameters:

  - `id` (string, required)
    The ID of the Security Test Scan to update
    Example: "abcdef1234567890ghijkl"

## Header parameters:

  - `X-Api-Key` (string)
    Harness personal or service access token
    Example: "Impedit quibusdam quae nihil qui."

## Request fields (application/json):

  - `artifactFingerprint` (string)
    The Artifact Fingerprint used use to identify the target
    Example: "abcdef1234567890ghijkl"

  - `codeCoverage` (number)
    The Code Coverage value for the Scan
    Example: 65.5

  - `executionId` (string, required)
    Pipeline Execution ID associated with the Scan
    Example: "abcdef1234567890ghijkl"

  - `gitMetadata` (object)
    Git Metadata associated with the Scan
    Example: {"detectedName":"Laborum dolorum tempore illum in.","detectedVariant":"Facilis porro eum distinctio expedita.","droneCorrelated":false,"provider":"Aut sit.","pullRequestNumber":11,"repositoryHttp":"https://github.com/harness/drone-cli.git","repositoryPath":["Perspiciatis sed veritatis architecto ducimus reiciendis.","Ratione dolor saepe.","Maxime in.","Vero earum nostrum blanditiis."],"repositorySsh":"git@github.com:harness/drone-cli.git","sourceBranch":"feat/shiny-object","targetBranch":"develop","workspace":"/harness"}

  - `gitMetadata.detectedName` (string)
    Detected Name
    Example: "Laborum dolorum tempore illum in."

  - `gitMetadata.detectedVariant` (string)
    Detected Variant
    Example: "Facilis porro eum distinctio expedita."

  - `gitMetadata.droneCorrelated` (boolean)
    Drone Correlated
    Example: true

  - `gitMetadata.provider` (string)
    Git Provider
    Example: "Aut sit."

  - `gitMetadata.pullRequestNumber` (integer)
    Git Pull Request Number
    Example: 11

  - `gitMetadata.repositoryHttp` (string)
    Git HTTP Repository
    Example: "https://github.com/harness/drone-cli.git"

  - `gitMetadata.repositoryPath` (array)
    Git Repository Path
    Example: ["Perspiciatis sed veritatis architecto ducimus reiciendis.","Ratione dolor saepe.","Maxime in.","Vero earum nostrum blanditiis."]

  - `gitMetadata.repositorySsh` (string)
    Git SSH Repository
    Example: "git@github.com:harness/drone-cli.git"

  - `gitMetadata.sourceBranch` (string)
    Git Source Branch
    Example: "feat/shiny-object"

  - `gitMetadata.targetBranch` (string)
    Git Target Branch
    Example: "develop"

  - `gitMetadata.workspace` (string)
    Git Workspace Root
    Example: "/harness"

  - `metadata` (object)
    Metadata specific to the entity being scanned
    Example: {"baseImageDigest":"sha256:1234567890abcdefghijkl","baseImageName":"alpine","baseImageTag":"3.18","deduplicatedCount":80,"honorGracePeriod":true,"imageDomain":"docker.io","imageName":"my-application","imageTag":"v1.2.3","ingestToolSeverityFlag":true,"normalizedCount":100,"scannerConsoleUrl":"https://app.shiftleft.io/apps/myapp/summary?scan=12345"}

  - `metadata.baseImageDigest` (string)
    Digest of the base image
    Example: "sha256:1234567890abcdefghijkl"

  - `metadata.baseImageName` (string)
    Name of the base image
    Example: "alpine"

  - `metadata.baseImageTag` (string)
    Tag of the base image
    Example: "3.18"

  - `metadata.deduplicatedCount` (integer)
    Total number of deduplicated issues found in the scan
    Example: 80

  - `metadata.honorGracePeriod` (boolean)
    Honor vendor-issued grace period when bucketing issue counts (Prisma/Twistlock only)
    Example: true

  - `metadata.imageDomain` (string)
    Domain of the container image registry
    Example: "docker.io"

  - `metadata.imageName` (string)
    Name of the container image
    Example: "my-application"

  - `metadata.imageTag` (string)
    Tag of the container image
    Example: "v1.2.3"

  - `metadata.ingestToolSeverityFlag` (boolean)
    Scan ran with ingest_tool_severity enabled in the pipeline
    Example: true

  - `metadata.normalizedCount` (integer)
    Total number of normalized issues found in the scan
    Example: 100

  - `metadata.scannerConsoleUrl` (string)
    URL to view scan results in the scanner's console
    Example: "https://app.shiftleft.io/apps/myapp/summary?scan=12345"

  - `orgId` (string, required)
    Harness Organization ID
    Example: "your_harness_org"

  - `pipelineId` (string, required)
    Harness Organization ID
    Example: "your_harness_pipeline"

  - `productId` (string, required)
    The Scan Product used for the Scan
    Example: "product111111111111111"

  - `projectId` (string, required)
    Harness Project ID
    Example: "your_harness_project"

  - `refinementVersion` (string, required)
    The Issue refinement version used for this Scan
    Example: "1.0.5"

  - `scannerDiffKey` (string)
    Key used to differentiate scanner configurations for scan comparison (e.g. sast, sca, sast_sca)
    Example: "sast"

  - `stageId` (string, required)
    Pipeline Stage ID associated with the Scan
    Example: "stage_id"

  - `status` (string, required)
    Current status of the Scan
    Enum: "Pending", "Running", "Succeeded", "Failed"

  - `stepId` (string, required)
    Pipeline Step ID associated with the Scan
    Example: "step_id"

  - `subproduct` (string)
    The Scan Subproduct used for the Scan
    Example: "owasp"

  - `targetVariantId` (string, required)
    The Target Variant associated with the Scan
    Example: "variant111111111111111"

## Response 200 fields (application/json):

  - `codeCoverage` (number)
    The Code Coverage value for the Scan
    Example: 65.5

  - `created` (integer, required)
    Unix timestamp at which the resource was created
    Example: 1651578240

  - `executionId` (string, required)
    Pipeline Execution ID associated with the Scan
    Example: "abcdef1234567890ghijkl"

  - `gitMetadata` (object)
    Git Metadata associated with the Scan
    Example: {"detectedName":"Laborum dolorum tempore illum in.","detectedVariant":"Facilis porro eum distinctio expedita.","droneCorrelated":false,"provider":"Aut sit.","pullRequestNumber":11,"repositoryHttp":"https://github.com/harness/drone-cli.git","repositoryPath":["Perspiciatis sed veritatis architecto ducimus reiciendis.","Ratione dolor saepe.","Maxime in.","Vero earum nostrum blanditiis."],"repositorySsh":"git@github.com:harness/drone-cli.git","sourceBranch":"feat/shiny-object","targetBranch":"develop","workspace":"/harness"}

  - `id` (string, required)
    Resource identifier
    Example: "abcdef1234567890ghijkl"

  - `lastModified` (integer, required)
    Unix timestamp at which the resource was most recently modified
    Example: 1651578240

  - `metadata` (object)
    Metadata specific to the entity being scanned
    Example: {"baseImageDigest":"sha256:1234567890abcdefghijkl","baseImageName":"alpine","baseImageTag":"3.18","deduplicatedCount":80,"honorGracePeriod":true,"imageDomain":"docker.io","imageName":"my-application","imageTag":"v1.2.3","ingestToolSeverityFlag":true,"normalizedCount":100,"scannerConsoleUrl":"https://app.shiftleft.io/apps/myapp/summary?scan=12345"}

  - `orgId` (string, required)
    Harness Organization ID
    Example: "your_harness_org"

  - `pipelineId` (string, required)
    Harness Organization ID
    Example: "your_harness_pipeline"

  - `productId` (string, required)
    The Scan Product used for the Scan
    Example: "product111111111111111"

  - `projectId` (string, required)
    Harness Project ID
    Example: "your_harness_project"

  - `refinementVersion` (string, required)
    The Issue refinement version used for this Scan
    Example: "1.0.5"

  - `scannerDiffKey` (string)
    Key used to differentiate scanner configurations for scan comparison (e.g. sast, sca, sast_sca)
    Example: "sast"

  - `stageId` (string, required)
    Pipeline Stage ID associated with the Scan
    Example: "stage_id"

  - `status` (string, required)
    Current status of the Scan
    Enum: "Pending", "Running", "Succeeded", "Failed"

  - `stepId` (string, required)
    Pipeline Step ID associated with the Scan
    Example: "step_id"

  - `subproduct` (string)
    The Scan Subproduct used for the Scan
    Example: "owasp"

  - `targetVariantId` (string, required)
    The Target Variant associated with the Scan
    Example: "variant111111111111111"

## Response 400 fields (application/json):

  - `message` (string, required)
    Example: "Not Found"

  - `status` (integer)
    Example: 404


