# Test Targets

Access and modify Scan Targets

## Targets#ListTargets

 - [GET /sto/api/v2/targets](https://apidocs.harness.io/test-targets/targets_listtargets.md): List a collection of Test Targets

## Targets#CreateTarget

 - [POST /sto/api/v2/targets](https://apidocs.harness.io/test-targets/targets_createtarget.md): Create a new Test Target

## Targets#DeleteTarget

 - [DELETE /sto/api/v2/targets/{id}](https://apidocs.harness.io/test-targets/targets_deletetarget.md): Delete an existing Test Target

## Targets#FindTargetById

 - [GET /sto/api/v2/targets/{id}](https://apidocs.harness.io/test-targets/targets_findtargetbyid.md): Find Test Target by ID

## Targets#PatchTarget

 - [PATCH /sto/api/v2/targets/{id}](https://apidocs.harness.io/test-targets/targets_patchtarget.md): Update only certain fields on an existing Test Target

## Targets#UpdateTarget

 - [PUT /sto/api/v2/targets/{id}](https://apidocs.harness.io/test-targets/targets_updatetarget.md): Update an existing Test Target

## List target executions

 - [GET /sto/api/v2/targets/{id}/executions](https://apidocs.harness.io/test-targets/targets_listtargetexecutions.md): Paginated target scan history for UI 3.0: build id, pipeline, branch, scan types, and severity counts per execution. Sorted by startedAt DESC (dummy data until store wiring).

## Get target execution metadata

 - [GET /sto/api/v2/targets/{id}/executions/{executionId}](https://apidocs.harness.io/test-targets/targets_gettargetexecution.md): Header metadata for one target execution on the scan history detail page: build id, CI source, pipeline name, findings count, sbom count, and whether a ShiftLeft/Qwiet scan ran.

## List target execution findings

 - [GET /sto/api/v2/targets/{id}/executions/{executionId}/occurrences](https://apidocs.harness.io/test-targets/targets_listtargetexecutionoccurrences.md): Returns a paginated list of findings for one target execution. Each scan that reported an occurrence is returned as its own row (no cross-scan dedupe); FE can dedupe with occurrenceInternalId + scanId. Each row includes issueId, scanId, occurrenceInternalId, and optional exemptionId (occurrence-scoped) so the UI can use existing ticket/exemption APIs.

## Get target execution occurrence

 - [GET /sto/api/v2/targets/{id}/executions/{executionId}/occurrences/{occurrenceInternalId}](https://apidocs.harness.io/test-targets/targets_gettargetexecutionoccurrence.md): Returns one occurrence from a target execution by occurrenceInternalId for a specific scan. Pass scanId from the findings list row — the same occurrenceInternalId may appear once per scan in an execution. The response is the same occurrence Details object used by the vulnerabilities and Issue Page V2 APIs.

## Get target overview

 - [GET /sto/api/v2/targets/{id}/overview](https://apidocs.harness.io/test-targets/targets_targetoverview.md): Target detail overview for UI 3.0: findings/issues tiles, scan coverage, and issue-type x severity matrix. Served from target_summary + latest execution (dummy data until store wiring).

## Get target SBOM

 - [GET /sto/api/v2/targets/{id}/sbom](https://apidocs.harness.io/test-targets/targets_targetsbom.md): Proxy ShiftLeft/Qwiet compound BOM for a target. Resolves polyglot scan and compound from ShiftLeft scan metadata, then calls Qwiet v4 compounds/named/{compound}/bom.

## Get target SCA packages

 - [GET /sto/api/v2/targets/{id}/sca/packages](https://apidocs.harness.io/test-targets/targets_targetscapackages.md): Proxy ShiftLeft/Qwiet SCA packages for a target. Resolves polyglot scan and compound from ShiftLeft scan metadata, then calls Qwiet v4 compounds/named/{compound}/sca/packages.

