For the complete documentation index, see llms.txt. This page is also available as Markdown.

Applications

User-created groups of already-scanned targets in one project

List applications

get
/api/v2/applications

List applications in a project. Counts, findings, scan types, and last scan are read from each member scoreboard.

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
accountIdstringRequired

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
orgIdstring · max: 128Required

Harness Organization ID

Example: example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectIdstring · max: 128Required

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
pageinteger · int64Optional

Page number to fetch, starting from 0

Default: 0Example: 0
pageSizeinteger · int64 · min: 1 · max: 100Optional

Results per page

Default: 10Example: 10
searchstring · max: 256Optional

Case-insensitive application name substring

Example: Payment
sortstring · enumOptional

Sort field

Default: lastScanAtExample: lastScanAtPossible values:
orderstring · enumOptional

Sort direction

Default: DESCExample: DESCPossible values:
severitystringOptional

Comma-separated severities. Keeps an application whose summed occurrence count for any listed severity is greater than 0.

Example: critical,highPattern: ^((critical|high|medium|low|info|unassigned)(,(critical|high|medium|low|info|unassigned))*)?$
scanTypesstring · max: 256Optional

Comma-separated scan types. Keeps an application whose member scan types overlap this list.

Example: SAST,SCAPattern: ^([^,]+(,[^,]+)*)?$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Est nobis eius illum.
Responses
200

OK response.

application/json
get/api/v2/applications
GET /gateway/sto/api/v2/applications?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "pagination": {
    "link": "",
    "page": 4,
    "pageSize": 20,
    "totalItems": 230,
    "totalPages": 12
  },
  "results": [
    {
      "artifactCount": 4,
      "id": "appid1234567890abcdefgh",
      "lastScanAt": 1751793300000,
      "name": "Payment Platform",
      "occurrenceSeverityCounts": {
        "critical": 75,
        "high": 143,
        "info": 0,
        "low": 267,
        "medium": 204,
        "unassigned": 0
      },
      "repositoryCount": 12,
      "scanTypes": [
        "SAST",
        "SCA"
      ],
      "targetCount": 16
    },
    {
      "artifactCount": 4,
      "id": "appid1234567890abcdefgh",
      "lastScanAt": 1751793300000,
      "name": "Payment Platform",
      "occurrenceSeverityCounts": {
        "critical": 75,
        "high": 143,
        "info": 0,
        "low": 267,
        "medium": 204,
        "unassigned": 0
      },
      "repositoryCount": 12,
      "scanTypes": [
        "SAST",
        "SCA"
      ],
      "targetCount": 16
    }
  ]
}

Create an application

post
/api/v2/applications

Create an application and its members in one transaction. Does not start a scan.

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
accountIdstringRequired

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
orgIdstring · max: 128Required

Harness Organization ID

Example: example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectIdstring · max: 128Required

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Voluptatem libero.
Body
businessCriticalitystring · enumRequired

Business criticality

Example: CriticalPossible values:
dataSensitivitystring · enumOptional

Data sensitivity. Omitted means unset.

Example: ConfidentialPossible values:
deploymentEnvironmentstring · enumOptional

Deployment environment. Omitted means unset.

Example: ProductionPossible values:
internetExposurestring · enumOptional

Internet exposure. Omitted means unset.

Example: Internet ExposurePossible values:
namestring · min: 1 · max: 128Required

Application name. Unique among live applications in the project.

Example: Payment Platform
targetIdsstring[] · min: 1 · max: 100Required

Scanned target ids in this project. Minimum 1, maximum 100, no duplicates.

Example: ["abcdef1234567890ghijkl","xyz987zyx654wvu321tsr9"]
Responses
200

OK response.

application/json
idstringRequired

Resource identifier

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
post/api/v2/applications
POST /gateway/sto/api/v2/applications?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 233

{
  "businessCriticality": "Critical",
  "dataSensitivity": "Confidential",
  "deploymentEnvironment": "Production",
  "internetExposure": "Internet Exposure",
  "name": "Payment Platform",
  "targetIds": [
    "abcdef1234567890ghijkl",
    "xyz987zyx654wvu321tsr9"
  ]
}
{
  "id": "abcdef1234567890ghijkl"
}

Get an application

get
/api/v2/applications/{id}

Load one live application and its current members.

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Application id

Example: appid1234567890abcdefghPattern: ^[a-zA-Z0-9_-]{22}$
Query parameters
accountIdstringRequired

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
orgIdstring · max: 128Required

Harness Organization ID

Example: example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectIdstring · max: 128Required

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Repellendus debitis et vel velit et voluptatem.
Responses
200

OK response.

application/json

A named group of scanned targets in one project.

businessCriticalitystring · enumRequired

Business criticality

Example: CriticalPossible values:
createdinteger · int64Required

Unix timestamp at which the resource was created

Example: 1651578240
createdBystringRequired

Principal that created the application

Example: user111111111111111111
dataSensitivitystring · enumOptional

Data sensitivity. Omitted when unset.

Example: ConfidentialPossible values:
deploymentEnvironmentstring · enumOptional

Deployment environment. Omitted when unset.

Example: ProductionPossible values:
idstringRequired

Application id

Example: appid1234567890abcdefghPattern: ^[a-zA-Z0-9_-]{22}$
internetExposurestring · enumOptional

Internet exposure. Omitted when unset.

Example: Internet ExposurePossible values:
lastModifiedinteger · int64Required

Unix timestamp at which the resource was most recently modified

Example: 1651578240
lastModifiedBystringRequired

Principal that last modified the application

Example: user111111111111111111
namestringRequired

Application name

Example: Payment Platform
get/api/v2/applications/{id}
GET /gateway/sto/api/v2/applications/{id}?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "businessCriticality": "Critical",
  "created": 1651578240,
  "createdBy": "user111111111111111111",
  "dataSensitivity": "Confidential",
  "deploymentEnvironment": "Production",
  "id": "appid1234567890abcdefgh",
  "internetExposure": "Internet Exposure",
  "lastModified": 1651578240,
  "lastModifiedBy": "user111111111111111111",
  "name": "Payment Platform",
  "targets": [
    {
      "defaultRef": "main",
      "id": "abcdef1234567890ghijkl",
      "name": "payments-service",
      "type": "repository"
    },
    {
      "defaultRef": "main",
      "id": "abcdef1234567890ghijkl",
      "name": "payments-service",
      "type": "repository"
    }
  ]
}

Delete an application

delete
/api/v2/applications/{id}

Soft-delete an application. Member targets and their scans stay.

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Application id

Example: appid1234567890abcdefghPattern: ^[a-zA-Z0-9_-]{22}$
Query parameters
accountIdstringRequired

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
orgIdstring · max: 128Required

Harness Organization ID

Example: example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectIdstring · max: 128Required

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
Responses
200

OK response.

No content

delete/api/v2/applications/{id}
DELETE /gateway/sto/api/v2/applications/{id}?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Patch an application

patch
/api/v2/applications/{id}

Patch name and replace members in one transaction. Risk fields are not changed by this endpoint. Does not start a scan.

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Application id

Example: appid1234567890abcdefghPattern: ^[a-zA-Z0-9_-]{22}$
Query parameters
accountIdstringRequired

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
orgIdstring · max: 128Required

Harness Organization ID

Example: example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectIdstring · max: 128Required

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Exercitationem expedita rerum explicabo.
Body
namestring · min: 1 · max: 128Required

Application name. Unique among live applications in the project.

Example: Payment Platform
targetIdsstring[] · min: 1 · max: 100Required

Scanned target ids for this application after the update. Minimum 1, maximum 100, no duplicates.

Example: ["abcdef1234567890ghijkl","xyz987zyx654wvu321tsr9"]
Responses
200

OK response.

application/json

A named group of scanned targets in one project.

businessCriticalitystring · enumRequired

Business criticality

Example: CriticalPossible values:
createdinteger · int64Required

Unix timestamp at which the resource was created

Example: 1651578240
createdBystringRequired

Principal that created the application

Example: user111111111111111111
dataSensitivitystring · enumOptional

Data sensitivity. Omitted when unset.

Example: ConfidentialPossible values:
deploymentEnvironmentstring · enumOptional

Deployment environment. Omitted when unset.

Example: ProductionPossible values:
idstringRequired

Application id

Example: appid1234567890abcdefghPattern: ^[a-zA-Z0-9_-]{22}$
internetExposurestring · enumOptional

Internet exposure. Omitted when unset.

Example: Internet ExposurePossible values:
lastModifiedinteger · int64Required

Unix timestamp at which the resource was most recently modified

Example: 1651578240
lastModifiedBystringRequired

Principal that last modified the application

Example: user111111111111111111
namestringRequired

Application name

Example: Payment Platform
patch/api/v2/applications/{id}
PATCH /gateway/sto/api/v2/applications/{id}?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 91

{
  "name": "Payment Platform",
  "targetIds": [
    "abcdef1234567890ghijkl",
    "xyz987zyx654wvu321tsr9"
  ]
}
{
  "businessCriticality": "Critical",
  "created": 1651578240,
  "createdBy": "user111111111111111111",
  "dataSensitivity": "Confidential",
  "deploymentEnvironment": "Production",
  "id": "appid1234567890abcdefgh",
  "internetExposure": "Internet Exposure",
  "lastModified": 1651578240,
  "lastModifiedBy": "user111111111111111111",
  "name": "Payment Platform",
  "targets": [
    {
      "defaultRef": "main",
      "id": "abcdef1234567890ghijkl",
      "name": "payments-service",
      "type": "repository"
    },
    {
      "defaultRef": "main",
      "id": "abcdef1234567890ghijkl",
      "name": "payments-service",
      "type": "repository"
    }
  ]
}

Get an application overview

get
/api/v2/applications/{id}/overview

One application's list-row scoreboard. Target counts, scan types, and findings are unique inside this application.

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Application id

Example: appid1234567890abcdefghPattern: ^[a-zA-Z0-9_-]{22}$
Query parameters
accountIdstringRequired

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
orgIdstring · max: 128Required

Harness Organization ID

Example: example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectIdstring · max: 128Required

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Omnis aut natus deserunt praesentium quod maiores.
Responses
200

OK response.

application/json

One applications-table row. Counts are unique inside the application.

artifactCountinteger · int64Required

Counted members of type container

Example: 4
idstringRequired

Application id

Example: appid1234567890abcdefghPattern: ^[a-zA-Z0-9_-]{22}$
lastScanAtinteger · int64Optional

Newest member last-scan time in milliseconds since Unix epoch. Omitted when every member has no last scan.

Example: 1751793300000
namestringRequired

Application name

Example: Payment Platform
repositoryCountinteger · int64Required

Counted members of type repository

Example: 12
scanTypesstring[]Required

Distinct scan types that appear on this application's counted members, sorted by name. A type that was never scanned is omitted.

Example: ["SAST","SCA"]
targetCountinteger · int64Required

Counted members

Example: 16
get/api/v2/applications/{id}/overview
GET /gateway/sto/api/v2/applications/{id}/overview?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "artifactCount": 4,
  "id": "appid1234567890abcdefgh",
  "lastScanAt": 1751793300000,
  "name": "Payment Platform",
  "occurrenceSeverityCounts": {
    "critical": 75,
    "high": 143,
    "info": 0,
    "low": 267,
    "medium": 204,
    "unassigned": 0
  },
  "repositoryCount": 12,
  "scanTypes": [
    "SAST",
    "SCA"
  ],
  "targetCount": 16
}

List application targets

get
/api/v2/applications/{id}/targets

List the scanned members of one application.

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

Application id

Example: appid1234567890abcdefghPattern: ^[a-zA-Z0-9_-]{22}$
Query parameters
accountIdstringRequired

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
orgIdstring · max: 128Required

Harness Organization ID

Example: example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectIdstring · max: 128Required

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
pageinteger · int64Optional

Page number to fetch, starting from 0

Default: 0Example: 0
pageSizeinteger · int64 · min: 1 · max: 100Optional

Results per page

Default: 10Example: 10
searchstring · max: 256Optional

Case-insensitive target name substring

Example: payments
typestring · enumOptional

Target type. repository or container. container is an artifact.

Example: repositoryPossible values:
severitystringOptional

Comma-separated severities. Keeps a member whose own occurrence count for any listed severity is greater than 0.

Example: criticalPattern: ^((critical|high|medium|low|info|unassigned)(,(critical|high|medium|low|info|unassigned))*)?$
sortstring · enumOptional

Sort field

Default: lastScanAtExample: lastScanAtPossible values:
orderstring · enumOptional

Sort direction. Omitted with sort=name means ASC. Otherwise omitted means DESC.

Example: DESCPossible values:
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Sed sit aspernatur soluta et modi quas.
Responses
200

OK response.

application/json
get/api/v2/applications/{id}/targets
GET /gateway/sto/api/v2/applications/{id}/targets?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "pagination": {
    "link": "",
    "page": 4,
    "pageSize": 20,
    "totalItems": 230,
    "totalPages": 12
  },
  "results": [
    {
      "defaultRef": "main",
      "id": "abcdef1234567890ghijkl",
      "lastExecution": {
        "buildId": "222",
        "executionId": "abcdef1234567890ghijkl",
        "executionScanTypes": [
          "Container"
        ],
        "executionSource": "harness",
        "executionUrl": "https://jenkins.example.com/job/42",
        "pipelineId": "Security_Gate",
        "pipelineName": "Security Gate",
        "targetVariantId": "xyz987zyx654wvu321tsr9"
      },
      "lastScanAt": 1751793300000,
      "name": "payments-service",
      "occurrenceSeverityCounts": {
        "critical": 75,
        "high": 143,
        "info": 0,
        "low": 267,
        "medium": 204,
        "unassigned": 0
      },
      "scanTypes": [
        "SAST"
      ],
      "type": "repository"
    },
    {
      "defaultRef": "main",
      "id": "abcdef1234567890ghijkl",
      "lastExecution": {
        "buildId": "222",
        "executionId": "abcdef1234567890ghijkl",
        "executionScanTypes": [
          "Container"
        ],
        "executionSource": "harness",
        "executionUrl": "https://jenkins.example.com/job/42",
        "pipelineId": "Security_Gate",
        "pipelineName": "Security Gate",
        "targetVariantId": "xyz987zyx654wvu321tsr9"
      },
      "lastScanAt": 1751793300000,
      "name": "payments-service",
      "occurrenceSeverityCounts": {
        "critical": 75,
        "high": 143,
        "info": 0,
        "low": 267,
        "medium": 204,
        "unassigned": 0
      },
      "scanTypes": [
        "SAST"
      ],
      "type": "repository"
    }
  ]
}

Get applications overview

get
/api/v2/applications/overview

Project cards. A target that belongs to several applications is counted once.

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
accountIdstringRequired

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
orgIdstring · max: 128Required

Harness Organization ID

Example: example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectIdstring · max: 128Required

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Modi consectetur in veniam quas magni.
Responses
200

OK response.

application/json

The three project cards. Targets and findings are unique across applications.

artifactCountinteger · int64Required

Distinct counted artifacts

Example: 310
repositoryCountinteger · int64Required

Distinct counted repositories

Example: 420
scanTypesstring[]Required

Distinct scan types that appear on counted targets in the project, sorted by name. A type no target has been scanned with is omitted.

Example: ["SAST","SCA"]
totalApplicationsinteger · int64Required

Live applications in the project, including those with no counted members

Example: 20
totalTargetsinteger · int64Required

Distinct counted targets

Example: 1240
get/api/v2/applications/overview
GET /gateway/sto/api/v2/applications/overview?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "artifactCount": 310,
  "occurrenceSeverityTotals": {
    "critical": 75,
    "high": 143,
    "info": 0,
    "low": 267,
    "medium": 204,
    "unassigned": 0
  },
  "repositoryCount": 420,
  "scanTypes": [
    "SAST",
    "SCA"
  ],
  "totalApplications": 20,
  "totalTargets": 1240
}

Last updated

Was this helpful?