# Targets#CreateTarget Create a new Test Target Endpoint: POST /sto/api/v2/targets Version: 1.0 Security: ## Query parameters: - `accountId` (string, required) Harness Account ID Example: "abcdef1234567890ghijkl" - `orgId` (string, required) Harness Organization ID Example: "example_org" - `projectId` (string, required) Harness Project ID Example: "example_project" ## Header parameters: - `X-Api-Key` (string) Harness personal or service access token Example: "Aut non." ## Request fields (application/json): - `baselineRegEx` (string) RegEx to match for dynamically selecting the Baseline for this Scan Target. Must be compatible with the RE2 standard. Example: "release_.*" - `baselineVariantId` (string) ID of baseline Target Variant for Issue comparison Example: "abcdef1234567890ghijkl" - `directory` (string) Directory within the Test Target to be scanned Example: "app/src" - `name` (string, required) Name of the Test Target Example: "NodeGoat" - `type` (string, required) Test Target's type Enum: "container", "repository", "instance", "configuration" - `url` (string) URL used to access the Test Target Example: "https://github.com/example/repo" ## 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