# Scans#CreateScan Create a new Security Test Scan Endpoint: POST /sto/api/v2/scans Version: 1.0 Security: ## Query parameters: - `accountId` (string, required) Harness Account ID Example: "abcdef1234567890ghijkl" ## Header parameters: - `X-Api-Key` (string) Harness personal or service access token Example: "Magni deserunt." - `X-Harness-User-Id` (string) Harness User ID Example: "abcdef1234567890ghijkl" ## Request fields (application/json): - `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":"Id et iste accusantium occaecati laboriosam quibusdam.","detectedVariant":"Eligendi eos qui commodi.","droneCorrelated":false,"provider":"Dignissimos reprehenderit accusamus ducimus.","pullRequestNumber":11,"repositoryHttp":"https://github.com/harness/drone-cli.git","repositoryPath":["Natus vel est rerum.","Repellendus facilis aspernatur cum ab vel.","Quae doloremque recusandae qui nostrum nam."],"repositorySsh":"git@github.com:harness/drone-cli.git","sourceBranch":"feat/shiny-object","targetBranch":"develop","workspace":"/harness"} - `gitMetadata.detectedName` (string) Detected Name Example: "Id et iste accusantium occaecati laboriosam quibusdam." - `gitMetadata.detectedVariant` (string) Detected Variant Example: "Eligendi eos qui commodi." - `gitMetadata.droneCorrelated` (boolean) Drone Correlated - `gitMetadata.provider` (string) Git Provider Example: "Dignissimos reprehenderit accusamus ducimus." - `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: ["Natus vel est rerum.","Repellendus facilis aspernatur cum ab vel.","Quae doloremque recusandae qui nostrum nam."] - `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" - `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" - `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): - `id` (string, required) Resource identifier Example: "abcdef1234567890ghijkl" ## Response 400 fields (application/json): - `message` (string, required) Example: "Not Found" - `status` (integer) Example: 404 ## Response 401 fields (application/json): - `message` (string, required) Example: "Not Found" - `status` (integer) Example: 404 ## Response 403 fields (application/json): - `message` (string, required) Example: "Not Found" - `status` (integer) Example: 404 ## Response 429 fields (application/json): - `message` (string, required) Example: "Not Found" - `status` (integer) Example: 404 ## Response 500 fields (application/json): - `message` (string, required) Example: "Not Found" - `status` (integer) Example: 404