Harness Test Targets API

Access and modify Scan Targets

Operations 13

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /sto/api/v2/targets List security test targets · Targets#List targets #
Ask an LLM
“Which test targets are defined for security scanning in my project?”
“Can I search test targets by name?”
Tell an agent
List the test targets in project {project} of org {org}.
Find test targets named {name} in project {project}.
POST /sto/api/v2/targets Create a security test target · Targets#Create target #
Ask an LLM
“How do I create a new test target for security scans?”
“Can I set a baseline branch pattern when creating a test target?”
Tell an agent
Create a {type} test target named {name} in project {project}.
Create test target {name} of type {type} with baseline pattern {baseline}.
DELETE /sto/api/v2/targets/{id} Delete a test target · Targets#Delete target #
Ask an LLM
“How do I delete a test target I no longer scan?”
“Can I remove a test target from a project?”
Tell an agent destructive · confirm first
Delete test target {target_id}.
Remove test target {target_id} from project {project}.
GET /sto/api/v2/targets/{id} Get a test target by ID · Targets#Find target by id #
Ask an LLM
“How do I look up one test target and its settings?”
“What type and baseline does a given test target have?”
Tell an agent
Get test target {target_id}.
Show test target {target_id} in project {project}.
PATCH /sto/api/v2/targets/{id} Change selected fields on a test target · Targets#Patch target #
Ask an LLM
“Can I change just the baseline of a test target without resending everything?”
“How do I update only the URL of an existing test target?”
Tell an agent
Patch test target {target_id} so its baseline pattern is {baseline}.
Change only the URL of test target {target_id} to {url}.
PUT /sto/api/v2/targets/{id} Replace a test target's definition · Targets#Update target #
Ask an LLM
“How do I fully replace a test target's name, type and baseline?”
“Can I overwrite every field of a test target in one update?”
Tell an agent
Replace test target {target_id} with name {name} and type {type}.
Overwrite target {target_id} as {name}, type {type}, directory {directory}.
GET /sto/api/v2/targets/{id}/executions List a test target's scan history · List target executions #
Ask an LLM
“What is the scan history for a test target, newest first?”
“Can I filter a target's scan executions by branch or scan type?”
Tell an agent
List scan executions for test target {target_id}.
Show target {target_id} executions on branch {branch}.
GET /sto/api/v2/targets/{id}/executions/{executionId} Get metadata for one target execution · Get target execution metadata #
Ask an LLM
“Which pipeline and build produced a given target scan execution?”
“How many findings and SBOMs did one target execution produce?”
Tell an agent
Get execution {execution_id} of test target {target_id}.
Show the header details for scan run {execution_id} on target {target_id}.
GET /sto/api/v2/targets/{id}/executions/{executionId}/occurrences List findings from a target execution · List target execution findings #
Ask an LLM
“What security findings did one scan execution of a target report?”
“Can I filter a target execution's findings by severity?”
Tell an agent
List findings for execution {execution_id} of target {target_id}.
Show {severity} findings from execution {execution_id} on target {target_id}.
GET /sto/api/v2/targets/{id}/executions/{executionId}/occurrences/{occurrenceInternalId} Get one finding occurrence from a target execution · Get target execution occurrence #
Ask an LLM
“How do I open the details of a single finding occurrence from a scan?”
“Why do I need the scan ID to fetch one occurrence of a finding?”
Tell an agent
Get occurrence {occurrence} from scan {scan} in execution {execution_id} of target {target_id}.
Show occurrence {occurrence} of execution {execution_id} on target {target_id} for scan {scan}.
GET /sto/api/v2/targets/{id}/overview Get a test target's findings overview · Get target overview #
Ask an LLM
“What does the security overview for a test target look like, by issue type and severity?”
“Can I see scan coverage and findings totals for one target?”
Tell an agent
Show the overview for test target {target_id}.
Summarize findings by severity for target {target_id}, variant {variant}.
GET /sto/api/v2/targets/{id}/sbom Download a test target's SBOM · Get target SBOM #
Ask an LLM
“Can I export the software bill of materials for a test target?”
“Which SBOM formats can I request for a target?”
Tell an agent
Download the SBOM for target {target_id} in format {format}.
Export the {format} SBOM of target {target_id} from execution {execution_id}.
GET /sto/api/v2/targets/{id}/sca/packages List open-source packages found on a target · Get target SCA packages #
Ask an LLM
“Which open-source packages did software composition analysis find in a target?”
“Can I filter a target's SCA packages by license?”
Tell an agent
List SCA packages for test target {target_id}.
Show packages on target {target_id} with license {license}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/harness:harness-test-targets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

harness-test-targets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Harness Test Targets API
  version: '1.0'
  description: The Harness Software Delivery Platform uses OpenAPI Specification v3.0.
  contact:
    name: API Support
    email: contact@harness.io
    url: https://harness.io/
  x-logo:
    url: https://mma.prnewswire.com/media/779232/Harnes_logo_horizontal.jpg?p=facebook
    altText: Harness
  termsOfService: https://harness.io/terms-of-use/
servers:
- url: https://app.harness.io
  description: Harness host URL
- url: https://{vanity}
  description: Vanity URL
  variables:
    vanity:
      default: app.harness.io
security:
- x-api-key: []
tags:


# --- truncated at 32 KB (140 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/harness/refs/heads/main/openapi/harness-test-targets-api-openapi.yml