# List target executions

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).

Endpoint: GET /sto/api/v2/targets/{id}/executions
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"

  - `page` (integer)
    Page number to fetch (starting from 0)
    Example: 4

  - `pageSize` (integer)
    Number of results per page
    Example: 50

  - `source` (string)
    Keep executions whose CI/CD source is in this comma-separated set (e.g. Harness, Jenkins, GithubActions). Empty/absent means no filter.
    Example: "Harness,Jenkins,GithubActions"

  - `branch` (string)
    Keep executions whose branch is in this comma-separated set. Empty/absent means no filter.
    Example: "main,develop"

  - `scanTypes` (string)
    Keep executions that include any of these comma-separated scan types. Empty/absent means no filter.
    Example: "SAST,SCA"

## Path parameters:

  - `id` (string, required)
    Target ID
    Example: "abcdef1234567890ghijkl"

## Response 200 fields (application/json):

  - `pagination` (object, required)
    Example: {"link":"","page":4,"pageSize":20,"totalItems":230,"totalPages":12}

  - `pagination.link` (string)
    Link-based paging

  - `pagination.page` (integer, required)
    Page number (starting from 0)
    Example: 4

  - `pagination.pageSize` (integer, required)
    Requested page size
    Example: 20

  - `pagination.totalItems` (integer, required)
    Total results available
    Example: 230

  - `pagination.totalPages` (integer, required)
    Total pages available
    Example: 12

  - `results` (array, required)
    Example: [{"branch":"main","buildId":"222","commitSha":"deadbeefdeadbeefdeadbeefdeadbeefdeadbeef","durationMs":593000,"executionId":"abcdef1234567890ghijkl","executionUrl":"https://qa.harness.io/ng/account/acct/ci/orgs/default/projects/STO/pipelines/p/executions/e/pipeline","issueSeverityCounts":{"critical":3,"high":4,"info":1,"low":2,"medium":5,"unassigned":0},"occurrenceSeverityCounts":{"critical":3,"high":4,"info":1,"low":2,"medium":5,"unassigned":0},"pipelineName":"Security Gate","scanTypes":["SAST","SCA","SECRET"],"source":"harness","startedAt":1751184000000,"triggeredBy":"user@harness.io"},{"branch":"main","buildId":"222","commitSha":"deadbeefdeadbeefdeadbeefdeadbeefdeadbeef","durationMs":593000,"executionId":"abcdef1234567890ghijkl","executionUrl":"https://qa.harness.io/ng/account/acct/ci/orgs/default/projects/STO/pipelines/p/executions/e/pipeline","issueSeverityCounts":{"critical":3,"high":4,"info":1,"low":2,"medium":5,"unassigned":0},"occurrenceSeverityCounts":{"critical":3,"high":4,"info":1,"low":2,"medium":5,"unassigned":0},"pipelineName":"Security Gate","scanTypes":["SAST","SCA","SECRET"],"source":"harness","startedAt":1751184000000,"triggeredBy":"user@harness.io"},{"branch":"main","buildId":"222","commitSha":"deadbeefdeadbeefdeadbeefdeadbeefdeadbeef","durationMs":593000,"executionId":"abcdef1234567890ghijkl","executionUrl":"https://qa.harness.io/ng/account/acct/ci/orgs/default/projects/STO/pipelines/p/executions/e/pipeline","issueSeverityCounts":{"critical":3,"high":4,"info":1,"low":2,"medium":5,"unassigned":0},"occurrenceSeverityCounts":{"critical":3,"high":4,"info":1,"low":2,"medium":5,"unassigned":0},"pipelineName":"Security Gate","scanTypes":["SAST","SCA","SECRET"],"source":"harness","startedAt":1751184000000,"triggeredBy":"user@harness.io"}]

  - `results.branch` (string, required)
    Git branch scanned
    Example: "main"

  - `results.buildId` (string, required)
    CI build id/number shown in UI (e.g. #222)
    Example: "222"

  - `results.commitSha` (string, required)
    Git commit SHA
    Example: "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef"

  - `results.durationMs` (integer, required)
    Execution duration in milliseconds
    Example: 593000

  - `results.executionId` (string, required)
    Harness Execution ID
    Example: "abcdef1234567890ghijkl"

  - `results.executionUrl` (string)
    Deep link to the pipeline execution
    Example: "https://qa.harness.io/ng/account/acct/ci/orgs/default/projects/STO/pipelines/p/executions/e/pipeline"

  - `results.issueSeverityCounts` (object, required)
    Counts by severity, sourced from target_summary.
    Example: {"critical":3,"high":4,"info":1,"low":2,"medium":5,"unassigned":0}

  - `results.issueSeverityCounts.critical` (integer, required)
    Critical severity count
    Example: 3

  - `results.issueSeverityCounts.high` (integer, required)
    High severity count
    Example: 4

  - `results.issueSeverityCounts.info` (integer, required)
    Info severity count
    Example: 1

  - `results.issueSeverityCounts.low` (integer, required)
    Low severity count
    Example: 2

  - `results.issueSeverityCounts.medium` (integer, required)
    Medium severity count
    Example: 5

  - `results.issueSeverityCounts.unassigned` (integer, required)
    Unassigned severity count

  - `results.occurrenceSeverityCounts` (object, required)
    Counts by severity, sourced from target_summary.
    Example: {"critical":3,"high":4,"info":1,"low":2,"medium":5,"unassigned":0}

  - `results.pipelineName` (string, required)
    Pipeline name shown under the build id
    Example: "Security Gate"

  - `results.scanTypes` (array, required)
    Scan types run in this execution
    Example: ["SAST","SCA","SECRET"]

  - `results.source` (string)
    CI/CD platform that ran this execution (harness, jenkins, github_actions, gitlab_ci, ...)
    Example: "harness"

  - `results.startedAt` (integer, required)
    Execution start time, milliseconds since Unix epoch
    Example: 1751184000000

  - `results.triggeredBy` (string, required)
    User or bot that triggered the execution
    Example: "user@harness.io"

## Response 400 fields (application/json):

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

  - `status` (integer)
    Example: 404


