For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Exemptions

Access and modify Exemptions to Security Issues

get
/api/v2/exemptions

List a collection of Exemptions

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}$
pageinteger · int64Optional

Page number to fetch (starting from 0)

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

Number of results per page

Default: 30Example: 50
orgIdstring · max: 128Optional

Harness Organization ID

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

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: Vero rerum quia.
Responses
200

OK response.

application/json
get/api/v2/exemptions
GET /gateway/sto/api/v2/exemptions?accountId=abcdef1234567890ghijkl 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": [
    {
      "approverEmail": "user@harness.io",
      "approverId": "user111111111111111111",
      "approverName": "firstname lastname",
      "canApproveFor": [
        "ACCOUNT",
        "ORG",
        "PROJECT",
        "PIPELINE"
      ],
      "canCancel": true,
      "canCreate": true,
      "canReApprove": true,
      "canReject": true,
      "comment": "This exemption was reviewed by the security team.",
      "created": 1651578240,
      "exemptionStatusAtScan": "Pending",
      "expiration": 1651578240,
      "id": "abcdef1234567890ghijkl",
      "isDeleted": true,
      "issueId": "abcdef1234567890ghijkl",
      "lastModified": 1651578240,
      "link": "https://example.com/ABC-1234",
      "numOccurrences": 10,
      "occurrences": [
        42,
        666
      ],
      "orgId": "your_project",
      "orgName": "Organization Name",
      "pendingChanges": {
        "durationDays": 7
      },
      "pipelineId": "your_pipeline",
      "projectId": "your_project",
      "projectName": "Project Name",
      "reason": "Waiting on upstream bug fix",
      "requestedOn": 1651578240,
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname",
      "reviewedOn": 1651578240,
      "scanId": "abcdef1234567890ghijkl",
      "scope": "PROJECT",
      "search": "CWE-123,5",
      "status": "Canceled",
      "targetId": "abcdef1234567890ghijkl",
      "type": "Other"
    },
    {
      "approverEmail": "user@harness.io",
      "approverId": "user111111111111111111",
      "approverName": "firstname lastname",
      "canApproveFor": [
        "ACCOUNT",
        "ORG",
        "PROJECT",
        "PIPELINE"
      ],
      "canCancel": true,
      "canCreate": true,
      "canReApprove": true,
      "canReject": true,
      "comment": "This exemption was reviewed by the security team.",
      "created": 1651578240,
      "exemptionStatusAtScan": "Pending",
      "expiration": 1651578240,
      "id": "abcdef1234567890ghijkl",
      "isDeleted": true,
      "issueId": "abcdef1234567890ghijkl",
      "lastModified": 1651578240,
      "link": "https://example.com/ABC-1234",
      "numOccurrences": 10,
      "occurrences": [
        42,
        666
      ],
      "orgId": "your_project",
      "orgName": "Organization Name",
      "pendingChanges": {
        "durationDays": 7
      },
      "pipelineId": "your_pipeline",
      "projectId": "your_project",
      "projectName": "Project Name",
      "reason": "Waiting on upstream bug fix",
      "requestedOn": 1651578240,
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname",
      "reviewedOn": 1651578240,
      "scanId": "abcdef1234567890ghijkl",
      "scope": "PROJECT",
      "search": "CWE-123,5",
      "status": "Canceled",
      "targetId": "abcdef1234567890ghijkl",
      "type": "Other"
    }
  ]
}
post
/api/v2/exemptions

Create a new Exemption

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

ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".

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

ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".

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

Harness personal or service access token

Example: Sunt iusto.
Body
exemptFutureOccurrencesbooleanOptional

States if the user wants to exempt future occurrences of the issue

Default: trueExample: false
expirationinteger · int64Optional

Unix timestamp at which this Exemption will expire

Example: 1651578240
issueIdstringRequired

Issue ID associated with the Exemption

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
linkstring · max: 1024Optional

Link to a related ticket

Example: https://example.com/ABC-1234
occurrencesinteger · int64[]Optional

Array of occurrence Ids

Example: [42,666]
pipelineIdstring · max: 128Optional

ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".

Example: your_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$
reasonstring · max: 1024Required

Text describing why this Exemption is necessary

Example: Waiting on upstream bug fix
requesterEmailstringOptional

Email of the user who requested this Exemption

Example: user@harness.io
requesterNamestringOptional

Name of the user who requested this Exemption

Example: firstname lastname
scanIdstringOptional

ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
searchstring · max: 256Optional

Search parameter to find filtered occurrences of the issue

Example: CWE-123,5
targetIdstringOptional

ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
typestring · enumRequired

Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)

Example: OtherPossible values:
Responses
200

OK response.

application/json
idstringRequired

Resource identifier

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
post/api/v2/exemptions
POST /gateway/sto/api/v2/exemptions?accountId=abcdef1234567890ghijkl&orgId=your_project&projectId=your_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: 435

{
  "exemptFutureOccurrences": false,
  "expiration": 1651578240,
  "issueId": "abcdef1234567890ghijkl",
  "link": "https://example.com/ABC-1234",
  "occurrences": [
    42,
    666
  ],
  "pendingChanges": {
    "durationDays": 7
  },
  "pipelineId": "your_pipeline",
  "reason": "Waiting on upstream bug fix",
  "requesterEmail": "user@harness.io",
  "requesterName": "firstname lastname",
  "scanId": "abcdef1234567890ghijkl",
  "search": "CWE-123,5",
  "targetId": "abcdef1234567890ghijkl",
  "type": "Other"
}
{
  "id": "abcdef1234567890ghijkl"
}
get
/api/v2/exemptions/{id}

Find Exemption by ID

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

The ID of the Exemption to retrieve

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

Harness Account ID

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

Harness Organization ID

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

Harness Project ID

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

Harness Execution ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
ignoreScopebooleanOptional

Ignore scope

Example: false
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Rerum perferendis iusto deserunt natus cumque.
Responses
200

OK response.

application/json

Information about an Exemption

approverEmailstringOptional

Email of the user who approved this Exemption

Example: user@harness.io
approverIdstringOptional

User ID the user who approved or rejected this exemptions

Example: user111111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
approverNamestringOptional

Name of the user who approved this Exemption

Example: firstname lastname
canCancelbooleanOptional

States if the user can cancel the exemption

Default: falseExample: true
canCreatebooleanOptional

States whether the user can create or reopen the exemption

Default: falseExample: true
canReApprovebooleanOptional

States if the user can re-approve the exemption for the exemption's scope

Default: falseExample: true
canRejectbooleanOptional

States whether the user can reject the exemption

Default: falseExample: true
commentstringOptional

The additional comment to include with the exemption

Example: This exemption was reviewed by the security team.
createdinteger · int64Required

Unix timestamp at which the resource was created

Example: 1651578240
exemptionStatusAtScanstring · enumOptional

Exemption's status at the Security Scan created time

Example: PendingPossible values:
expirationinteger · int64Optional

Unix timestamp at which this Exemption will expire

Example: 1651578240
idstringRequired

Resource identifier

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
isDeletedbooleanOptional

States if the exemption is deleted

Default: falseExample: true
issueIdstringRequired

Issue ID associated with the Exemption

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
lastModifiedinteger · int64Required

Unix timestamp at which the resource was most recently modified

Example: 1651578240
linkstring · max: 1024Optional

Link to a related ticket

Example: https://example.com/ABC-1234
numOccurrencesinteger · int64Optional

States how may occurrences are associated with the exemption, if not an issue level exemption

Default: 0Example: 10
occurrencesinteger · int64[]Optional

Array of occurrence Ids

Example: [42,666]
orgIdstring · max: 128Optional

ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".

Example: your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
orgNamestringOptional

Name of the organization associated with the exemption

Example: Organization Name
pipelineIdstring · max: 128Optional

ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".

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

ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".

Example: your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectNamestringOptional

Name of the project associated with the exemption

Example: Project Name
reasonstring · max: 1024Required

Text describing why this Exemption is necessary

Example: Waiting on upstream bug fix
requestedOninteger · int64Optional

Unix timestamp of the exemption's current request. Updates each time the exemption is reopened; falls back to the original creation time when never reopened.

Example: 1651578240
requesterEmailstringOptional

Email of the user who requested this Exemption

Example: user@harness.io
requesterIdstringRequired

User ID of the user who requested this Exemption

Example: user111111111111111111
requesterNamestringOptional

Name of the user who requested this Exemption

Example: firstname lastname
reviewedOninteger · int64Optional

Unix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.

Example: 1651578240
scanIdstringOptional

ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".

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

States the scope for the exemption

Example: PROJECTPossible values:
searchstring · max: 256Optional

Search parameter to find filtered occurrences of the issue

Example: CWE-123,5
statusstring · enumRequired

Approval status of Exemption

Default: PendingExample: RejectedPossible values:
targetIdstringOptional

ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
typestring · enumRequired

Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)

Example: OtherPossible values:
get/api/v2/exemptions/{id}
GET /gateway/sto/api/v2/exemptions/{id}?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "approverEmail": "user@harness.io",
  "approverId": "user111111111111111111",
  "approverName": "firstname lastname",
  "canApproveFor": [
    "ACCOUNT",
    "ORG",
    "PROJECT",
    "PIPELINE"
  ],
  "canCancel": true,
  "canCreate": true,
  "canReApprove": true,
  "canReject": true,
  "comment": "This exemption was reviewed by the security team.",
  "created": 1651578240,
  "exemptionStatusAtScan": "Pending",
  "expiration": 1651578240,
  "id": "abcdef1234567890ghijkl",
  "isDeleted": true,
  "issueId": "abcdef1234567890ghijkl",
  "lastModified": 1651578240,
  "link": "https://example.com/ABC-1234",
  "numOccurrences": 10,
  "occurrences": [
    42,
    666
  ],
  "orgId": "your_project",
  "orgName": "Organization Name",
  "pendingChanges": {
    "durationDays": 7
  },
  "pipelineId": "your_pipeline",
  "projectId": "your_project",
  "projectName": "Project Name",
  "reason": "Waiting on upstream bug fix",
  "requestedOn": 1651578240,
  "requesterEmail": "user@harness.io",
  "requesterId": "user111111111111111111",
  "requesterName": "firstname lastname",
  "reviewedOn": 1651578240,
  "scanId": "abcdef1234567890ghijkl",
  "scope": "PROJECT",
  "search": "CWE-123,5",
  "status": "Canceled",
  "targetId": "abcdef1234567890ghijkl",
  "type": "Other"
}
put
/api/v2/exemptions/{id}

Update an existing Exemption

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

The ID of the Exemption to update

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

Harness Account ID

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

ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".

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

ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".

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

Harness personal or service access token

Example: Dolore voluptate vel corporis.
Body
expirationinteger · int64Optional

Unix timestamp at which this Exemption will expire

Example: 1651578240
linkstring · max: 1024Optional

Link to a related ticket

Example: https://example.com/ABC-1234
pipelineIdstring · max: 128Optional

ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".

Example: your_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$
reasonstring · max: 1024Required

Text describing why this Exemption is necessary

Example: Waiting on upstream bug fix
requesterEmailstringOptional

Email of the user who requested this Exemption

Example: user@harness.io
requesterNamestringOptional

Name of the user who requested this Exemption

Example: firstname lastname
targetIdstringOptional

ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
typestring · enumRequired

Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)

Example: OtherPossible values:
Responses
200

OK response.

application/json

Information about an Exemption

approverEmailstringOptional

Email of the user who approved this Exemption

Example: user@harness.io
approverIdstringOptional

User ID the user who approved or rejected this exemptions

Example: user111111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
approverNamestringOptional

Name of the user who approved this Exemption

Example: firstname lastname
canCancelbooleanOptional

States if the user can cancel the exemption

Default: falseExample: true
canCreatebooleanOptional

States whether the user can create or reopen the exemption

Default: falseExample: true
canReApprovebooleanOptional

States if the user can re-approve the exemption for the exemption's scope

Default: falseExample: true
canRejectbooleanOptional

States whether the user can reject the exemption

Default: falseExample: true
commentstringOptional

The additional comment to include with the exemption

Example: This exemption was reviewed by the security team.
createdinteger · int64Required

Unix timestamp at which the resource was created

Example: 1651578240
exemptionStatusAtScanstring · enumOptional

Exemption's status at the Security Scan created time

Example: PendingPossible values:
expirationinteger · int64Optional

Unix timestamp at which this Exemption will expire

Example: 1651578240
idstringRequired

Resource identifier

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
isDeletedbooleanOptional

States if the exemption is deleted

Default: falseExample: true
issueIdstringRequired

Issue ID associated with the Exemption

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
lastModifiedinteger · int64Required

Unix timestamp at which the resource was most recently modified

Example: 1651578240
linkstring · max: 1024Optional

Link to a related ticket

Example: https://example.com/ABC-1234
numOccurrencesinteger · int64Optional

States how may occurrences are associated with the exemption, if not an issue level exemption

Default: 0Example: 10
occurrencesinteger · int64[]Optional

Array of occurrence Ids

Example: [42,666]
orgIdstring · max: 128Optional

ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".

Example: your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
orgNamestringOptional

Name of the organization associated with the exemption

Example: Organization Name
pipelineIdstring · max: 128Optional

ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".

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

ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".

Example: your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectNamestringOptional

Name of the project associated with the exemption

Example: Project Name
reasonstring · max: 1024Required

Text describing why this Exemption is necessary

Example: Waiting on upstream bug fix
requestedOninteger · int64Optional

Unix timestamp of the exemption's current request. Updates each time the exemption is reopened; falls back to the original creation time when never reopened.

Example: 1651578240
requesterEmailstringOptional

Email of the user who requested this Exemption

Example: user@harness.io
requesterIdstringRequired

User ID of the user who requested this Exemption

Example: user111111111111111111
requesterNamestringOptional

Name of the user who requested this Exemption

Example: firstname lastname
reviewedOninteger · int64Optional

Unix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.

Example: 1651578240
scanIdstringOptional

ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".

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

States the scope for the exemption

Example: PROJECTPossible values:
searchstring · max: 256Optional

Search parameter to find filtered occurrences of the issue

Example: CWE-123,5
statusstring · enumRequired

Approval status of Exemption

Default: PendingExample: RejectedPossible values:
targetIdstringOptional

ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
typestring · enumRequired

Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)

Example: OtherPossible values:
put/api/v2/exemptions/{id}
PUT /gateway/sto/api/v2/exemptions/{id}?accountId=abcdef1234567890ghijkl 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: 290

{
  "expiration": 1651578240,
  "link": "https://example.com/ABC-1234",
  "pendingChanges": {
    "durationDays": 7
  },
  "pipelineId": "your_pipeline",
  "reason": "Waiting on upstream bug fix",
  "requesterEmail": "user@harness.io",
  "requesterName": "firstname lastname",
  "targetId": "abcdef1234567890ghijkl",
  "type": "Other"
}
{
  "approverEmail": "user@harness.io",
  "approverId": "user111111111111111111",
  "approverName": "firstname lastname",
  "canApproveFor": [
    "ACCOUNT",
    "ORG",
    "PROJECT",
    "PIPELINE"
  ],
  "canCancel": true,
  "canCreate": true,
  "canReApprove": true,
  "canReject": true,
  "comment": "This exemption was reviewed by the security team.",
  "created": 1651578240,
  "exemptionStatusAtScan": "Pending",
  "expiration": 1651578240,
  "id": "abcdef1234567890ghijkl",
  "isDeleted": true,
  "issueId": "abcdef1234567890ghijkl",
  "lastModified": 1651578240,
  "link": "https://example.com/ABC-1234",
  "numOccurrences": 10,
  "occurrences": [
    42,
    666
  ],
  "orgId": "your_project",
  "orgName": "Organization Name",
  "pendingChanges": {
    "durationDays": 7
  },
  "pipelineId": "your_pipeline",
  "projectId": "your_project",
  "projectName": "Project Name",
  "reason": "Waiting on upstream bug fix",
  "requestedOn": 1651578240,
  "requesterEmail": "user@harness.io",
  "requesterId": "user111111111111111111",
  "requesterName": "firstname lastname",
  "reviewedOn": 1651578240,
  "scanId": "abcdef1234567890ghijkl",
  "scope": "PROJECT",
  "search": "CWE-123,5",
  "status": "Canceled",
  "targetId": "abcdef1234567890ghijkl",
  "type": "Other"
}
put
/api/v2/exemptions/{id}/{action}

Approve/reject an existing Exemption

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

The ID of the Exemption to update

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
actionstring · enumRequired

The approval action to take on the Exemption

Example: approvePossible values:
Query parameters
accountIdstringRequired

Harness Account ID

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

Harness Organization ID

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

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: Quia doloribus voluptatibus harum.
Body
commentstring · max: 1024Optional

Comment to be added to the Exemption approval or rejection

Example: This is a comment for the approval or rejection of the exemption
Responses
200

OK response.

application/json

Information about an Exemption

approverEmailstringOptional

Email of the user who approved this Exemption

Example: user@harness.io
approverIdstringOptional

User ID the user who approved or rejected this exemptions

Example: user111111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
approverNamestringOptional

Name of the user who approved this Exemption

Example: firstname lastname
canCancelbooleanOptional

States if the user can cancel the exemption

Default: falseExample: true
canCreatebooleanOptional

States whether the user can create or reopen the exemption

Default: falseExample: true
canReApprovebooleanOptional

States if the user can re-approve the exemption for the exemption's scope

Default: falseExample: true
canRejectbooleanOptional

States whether the user can reject the exemption

Default: falseExample: true
commentstringOptional

The additional comment to include with the exemption

Example: This exemption was reviewed by the security team.
createdinteger · int64Required

Unix timestamp at which the resource was created

Example: 1651578240
exemptionStatusAtScanstring · enumOptional

Exemption's status at the Security Scan created time

Example: PendingPossible values:
expirationinteger · int64Optional

Unix timestamp at which this Exemption will expire

Example: 1651578240
idstringRequired

Resource identifier

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
isDeletedbooleanOptional

States if the exemption is deleted

Default: falseExample: true
issueIdstringRequired

Issue ID associated with the Exemption

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
lastModifiedinteger · int64Required

Unix timestamp at which the resource was most recently modified

Example: 1651578240
linkstring · max: 1024Optional

Link to a related ticket

Example: https://example.com/ABC-1234
numOccurrencesinteger · int64Optional

States how may occurrences are associated with the exemption, if not an issue level exemption

Default: 0Example: 10
occurrencesinteger · int64[]Optional

Array of occurrence Ids

Example: [42,666]
orgIdstring · max: 128Optional

ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".

Example: your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
orgNamestringOptional

Name of the organization associated with the exemption

Example: Organization Name
pipelineIdstring · max: 128Optional

ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".

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

ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".

Example: your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectNamestringOptional

Name of the project associated with the exemption

Example: Project Name
reasonstring · max: 1024Required

Text describing why this Exemption is necessary

Example: Waiting on upstream bug fix
requestedOninteger · int64Optional

Unix timestamp of the exemption's current request. Updates each time the exemption is reopened; falls back to the original creation time when never reopened.

Example: 1651578240
requesterEmailstringOptional

Email of the user who requested this Exemption

Example: user@harness.io
requesterIdstringRequired

User ID of the user who requested this Exemption

Example: user111111111111111111
requesterNamestringOptional

Name of the user who requested this Exemption

Example: firstname lastname
reviewedOninteger · int64Optional

Unix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.

Example: 1651578240
scanIdstringOptional

ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".

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

States the scope for the exemption

Example: PROJECTPossible values:
searchstring · max: 256Optional

Search parameter to find filtered occurrences of the issue

Example: CWE-123,5
statusstring · enumRequired

Approval status of Exemption

Default: PendingExample: RejectedPossible values:
targetIdstringOptional

ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
typestring · enumRequired

Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)

Example: OtherPossible values:
put/api/v2/exemptions/{id}/{action}
PUT /gateway/sto/api/v2/exemptions/{id}/{action}?accountId=abcdef1234567890ghijkl 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: 123

{
  "comment": "This is a comment for the approval or rejection of the exemption",
  "pendingChangesOverride": {
    "durationDays": 30
  }
}
{
  "approverEmail": "user@harness.io",
  "approverId": "user111111111111111111",
  "approverName": "firstname lastname",
  "canApproveFor": [
    "ACCOUNT",
    "ORG",
    "PROJECT",
    "PIPELINE"
  ],
  "canCancel": true,
  "canCreate": true,
  "canReApprove": true,
  "canReject": true,
  "comment": "This exemption was reviewed by the security team.",
  "created": 1651578240,
  "exemptionStatusAtScan": "Pending",
  "expiration": 1651578240,
  "id": "abcdef1234567890ghijkl",
  "isDeleted": true,
  "issueId": "abcdef1234567890ghijkl",
  "lastModified": 1651578240,
  "link": "https://example.com/ABC-1234",
  "numOccurrences": 10,
  "occurrences": [
    42,
    666
  ],
  "orgId": "your_project",
  "orgName": "Organization Name",
  "pendingChanges": {
    "durationDays": 7
  },
  "pipelineId": "your_pipeline",
  "projectId": "your_project",
  "projectName": "Project Name",
  "reason": "Waiting on upstream bug fix",
  "requestedOn": 1651578240,
  "requesterEmail": "user@harness.io",
  "requesterId": "user111111111111111111",
  "requesterName": "firstname lastname",
  "reviewedOn": 1651578240,
  "scanId": "abcdef1234567890ghijkl",
  "scope": "PROJECT",
  "search": "CWE-123,5",
  "status": "Canceled",
  "targetId": "abcdef1234567890ghijkl",
  "type": "Other"
}
put
/api/v2/exemptions/{id}/promote

Promote an existing Exemption to a higher scope

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

The ID of the Exemption to promote

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

Harness Account ID

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

Harness Organization ID

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

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: Expedita pariatur aut dignissimos excepturi eos.
Body
commentstring · max: 1024Optional

Comment to be added to the Exemption approval or rejection

Example: This is a comment for the approval or rejection of the exemption
pipelineIdstring · max: 128Optional

Harness STO pipeline ID

Example: abcdef1234567890ghijklPattern: ^[A-Za-z_][A-Za-z0-9_]*$
targetIdstringOptional

Harness STO Target ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
Responses
200

OK response.

application/json

Information about an Exemption

approverEmailstringOptional

Email of the user who approved this Exemption

Example: user@harness.io
approverIdstringOptional

User ID the user who approved or rejected this exemptions

Example: user111111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
approverNamestringOptional

Name of the user who approved this Exemption

Example: firstname lastname
canCancelbooleanOptional

States if the user can cancel the exemption

Default: falseExample: true
canCreatebooleanOptional

States whether the user can create or reopen the exemption

Default: falseExample: true
canReApprovebooleanOptional

States if the user can re-approve the exemption for the exemption's scope

Default: falseExample: true
canRejectbooleanOptional

States whether the user can reject the exemption

Default: falseExample: true
commentstringOptional

The additional comment to include with the exemption

Example: This exemption was reviewed by the security team.
createdinteger · int64Required

Unix timestamp at which the resource was created

Example: 1651578240
exemptionStatusAtScanstring · enumOptional

Exemption's status at the Security Scan created time

Example: PendingPossible values:
expirationinteger · int64Optional

Unix timestamp at which this Exemption will expire

Example: 1651578240
idstringRequired

Resource identifier

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
isDeletedbooleanOptional

States if the exemption is deleted

Default: falseExample: true
issueIdstringRequired

Issue ID associated with the Exemption

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
lastModifiedinteger · int64Required

Unix timestamp at which the resource was most recently modified

Example: 1651578240
linkstring · max: 1024Optional

Link to a related ticket

Example: https://example.com/ABC-1234
numOccurrencesinteger · int64Optional

States how may occurrences are associated with the exemption, if not an issue level exemption

Default: 0Example: 10
occurrencesinteger · int64[]Optional

Array of occurrence Ids

Example: [42,666]
orgIdstring · max: 128Optional

ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".

Example: your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
orgNamestringOptional

Name of the organization associated with the exemption

Example: Organization Name
pipelineIdstring · max: 128Optional

ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".

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

ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".

Example: your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectNamestringOptional

Name of the project associated with the exemption

Example: Project Name
reasonstring · max: 1024Required

Text describing why this Exemption is necessary

Example: Waiting on upstream bug fix
requestedOninteger · int64Optional

Unix timestamp of the exemption's current request. Updates each time the exemption is reopened; falls back to the original creation time when never reopened.

Example: 1651578240
requesterEmailstringOptional

Email of the user who requested this Exemption

Example: user@harness.io
requesterIdstringRequired

User ID of the user who requested this Exemption

Example: user111111111111111111
requesterNamestringOptional

Name of the user who requested this Exemption

Example: firstname lastname
reviewedOninteger · int64Optional

Unix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.

Example: 1651578240
scanIdstringOptional

ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".

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

States the scope for the exemption

Example: PROJECTPossible values:
searchstring · max: 256Optional

Search parameter to find filtered occurrences of the issue

Example: CWE-123,5
statusstring · enumRequired

Approval status of Exemption

Default: PendingExample: RejectedPossible values:
targetIdstringOptional

ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
typestring · enumRequired

Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)

Example: OtherPossible values:
put/api/v2/exemptions/{id}/promote
PUT /gateway/sto/api/v2/exemptions/{id}/promote?accountId=abcdef1234567890ghijkl 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: 197

{
  "comment": "This is a comment for the approval or rejection of the exemption",
  "pendingChangesOverride": {
    "durationDays": 30
  },
  "pipelineId": "abcdef1234567890ghijkl",
  "targetId": "abcdef1234567890ghijkl"
}
{
  "approverEmail": "user@harness.io",
  "approverId": "user111111111111111111",
  "approverName": "firstname lastname",
  "canApproveFor": [
    "ACCOUNT",
    "ORG",
    "PROJECT",
    "PIPELINE"
  ],
  "canCancel": true,
  "canCreate": true,
  "canReApprove": true,
  "canReject": true,
  "comment": "This exemption was reviewed by the security team.",
  "created": 1651578240,
  "exemptionStatusAtScan": "Pending",
  "expiration": 1651578240,
  "id": "abcdef1234567890ghijkl",
  "isDeleted": true,
  "issueId": "abcdef1234567890ghijkl",
  "lastModified": 1651578240,
  "link": "https://example.com/ABC-1234",
  "numOccurrences": 10,
  "occurrences": [
    42,
    666
  ],
  "orgId": "your_project",
  "orgName": "Organization Name",
  "pendingChanges": {
    "durationDays": 7
  },
  "pipelineId": "your_pipeline",
  "projectId": "your_project",
  "projectName": "Project Name",
  "reason": "Waiting on upstream bug fix",
  "requestedOn": 1651578240,
  "requesterEmail": "user@harness.io",
  "requesterId": "user111111111111111111",
  "requesterName": "firstname lastname",
  "reviewedOn": 1651578240,
  "scanId": "abcdef1234567890ghijkl",
  "scope": "PROJECT",
  "search": "CWE-123,5",
  "status": "Canceled",
  "targetId": "abcdef1234567890ghijkl",
  "type": "Other"
}

Bulk create exemptions

post
/api/v2/exemptions/bulk

Create multiple Exemptions in bulk. The batch is all-or-none for policy violations: if any item would violate an exemption rule, the entire batch is rejected with HTTP 400 and a single error message naming the failing issue and rule (no DB writes happen). Infrastructure failures (DB constraint violations, transaction errors) also fail the entire batch and are surfaced per-item in the response body so ops can diagnose which item triggered the failure.

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: Ducimus cupiditate.
Body
exemptFutureOccurrencesbooleanOptional

Whether to exempt future occurrences of each issue

Default: trueExample: false
expirationinteger · int64Optional

Unix timestamp at which these Exemptions will expire

Example: 1651578240
linkstring · max: 1024Optional

Link to a related ticket

Example: https://example.com/ABC-1234
reasonstring · max: 1024Required

Text describing why these Exemptions are necessary

Example: Waiting on upstream bug fix
requesterEmailstringOptional

Email of the user who requested these Exemptions

Example: user@harness.io
requesterNamestringOptional

Name of the user who requested these Exemptions

Example: firstname lastname
typestring · enumRequired

Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)

Example: OtherPossible values:
Responses
200

OK response.

application/json
failedinteger · int64Required

Number of failed exemption creations

Example: 1
succeededinteger · int64Required

Number of successfully created exemptions

Example: 5
post/api/v2/exemptions/bulk
POST /gateway/sto/api/v2/exemptions/bulk?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: 627

{
  "exemptFutureOccurrences": false,
  "expiration": 1651578240,
  "items": [
    {
      "issueId": "abcdef1234567890ghijkl",
      "occurrences": [
        42,
        666
      ],
      "pipelineId": "your_pipeline",
      "scanId": "abcdef1234567890ghijkl",
      "search": "CWE-123,5",
      "targetId": "abcdef1234567890ghijkl"
    },
    {
      "issueId": "abcdef1234567890ghijkl",
      "occurrences": [
        42,
        666
      ],
      "pipelineId": "your_pipeline",
      "scanId": "abcdef1234567890ghijkl",
      "search": "CWE-123,5",
      "targetId": "abcdef1234567890ghijkl"
    }
  ],
  "link": "https://example.com/ABC-1234",
  "pendingChanges": {
    "durationDays": 7
  },
  "reason": "Waiting on upstream bug fix",
  "requesterEmail": "user@harness.io",
  "requesterName": "firstname lastname",
  "type": "Other"
}
{
  "failed": 1,
  "results": [
    {
      "error": "\"targetId\" must be specified when \"exempt future occurrences\" is disabled",
      "id": "abcdef1234567890ghijkl",
      "issueId": "abcdef1234567890ghijkl",
      "statusCode": 201
    },
    {
      "error": "\"targetId\" must be specified when \"exempt future occurrences\" is disabled",
      "id": "abcdef1234567890ghijkl",
      "issueId": "abcdef1234567890ghijkl",
      "statusCode": 201
    },
    {
      "error": "\"targetId\" must be specified when \"exempt future occurrences\" is disabled",
      "id": "abcdef1234567890ghijkl",
      "issueId": "abcdef1234567890ghijkl",
      "statusCode": 201
    }
  ],
  "succeeded": 5
}

Get exemption for issue

get
/api/v2/exemptions/issue/{issueId}

Get the highest-priority exemption for an issue across all scopes (account, org, project)

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

Issue ID to find exemption for

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

Harness Account ID

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

Harness Organization ID

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

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: Vel ducimus nihil.
Responses
200

OK response.

application/json

Information about an Exemption

approverEmailstringOptional

Email of the user who approved this Exemption

Example: user@harness.io
approverIdstringOptional

User ID the user who approved or rejected this exemptions

Example: user111111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
approverNamestringOptional

Name of the user who approved this Exemption

Example: firstname lastname
canCancelbooleanOptional

States if the user can cancel the exemption

Default: falseExample: true
canCreatebooleanOptional

States whether the user can create or reopen the exemption

Default: falseExample: true
canReApprovebooleanOptional

States if the user can re-approve the exemption for the exemption's scope

Default: falseExample: true
canRejectbooleanOptional

States whether the user can reject the exemption

Default: falseExample: true
commentstringOptional

The additional comment to include with the exemption

Example: This exemption was reviewed by the security team.
createdinteger · int64Required

Unix timestamp at which the resource was created

Example: 1651578240
exemptionStatusAtScanstring · enumOptional

Exemption's status at the Security Scan created time

Example: PendingPossible values:
expirationinteger · int64Optional

Unix timestamp at which this Exemption will expire

Example: 1651578240
idstringRequired

Resource identifier

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
isDeletedbooleanOptional

States if the exemption is deleted

Default: falseExample: true
issueIdstringRequired

Issue ID associated with the Exemption

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
lastModifiedinteger · int64Required

Unix timestamp at which the resource was most recently modified

Example: 1651578240
linkstring · max: 1024Optional

Link to a related ticket

Example: https://example.com/ABC-1234
numOccurrencesinteger · int64Optional

States how may occurrences are associated with the exemption, if not an issue level exemption

Default: 0Example: 10
occurrencesinteger · int64[]Optional

Array of occurrence Ids

Example: [42,666]
orgIdstring · max: 128Optional

ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".

Example: your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
orgNamestringOptional

Name of the organization associated with the exemption

Example: Organization Name
pipelineIdstring · max: 128Optional

ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".

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

ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".

Example: your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectNamestringOptional

Name of the project associated with the exemption

Example: Project Name
reasonstring · max: 1024Required

Text describing why this Exemption is necessary

Example: Waiting on upstream bug fix
requestedOninteger · int64Optional

Unix timestamp of the exemption's current request. Updates each time the exemption is reopened; falls back to the original creation time when never reopened.

Example: 1651578240
requesterEmailstringOptional

Email of the user who requested this Exemption

Example: user@harness.io
requesterIdstringRequired

User ID of the user who requested this Exemption

Example: user111111111111111111
requesterNamestringOptional

Name of the user who requested this Exemption

Example: firstname lastname
reviewedOninteger · int64Optional

Unix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.

Example: 1651578240
scanIdstringOptional

ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".

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

States the scope for the exemption

Example: PROJECTPossible values:
searchstring · max: 256Optional

Search parameter to find filtered occurrences of the issue

Example: CWE-123,5
statusstring · enumRequired

Approval status of Exemption

Default: PendingExample: RejectedPossible values:
targetIdstringOptional

ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
typestring · enumRequired

Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)

Example: OtherPossible values:
get/api/v2/exemptions/issue/{issueId}
GET /gateway/sto/api/v2/exemptions/issue/{issueId}?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "approverEmail": "user@harness.io",
  "approverId": "user111111111111111111",
  "approverName": "firstname lastname",
  "canApproveFor": [
    "ACCOUNT",
    "ORG",
    "PROJECT",
    "PIPELINE"
  ],
  "canCancel": true,
  "canCreate": true,
  "canReApprove": true,
  "canReject": true,
  "comment": "This exemption was reviewed by the security team.",
  "created": 1651578240,
  "exemptionStatusAtScan": "Pending",
  "expiration": 1651578240,
  "id": "abcdef1234567890ghijkl",
  "isDeleted": true,
  "issueId": "abcdef1234567890ghijkl",
  "lastModified": 1651578240,
  "link": "https://example.com/ABC-1234",
  "numOccurrences": 10,
  "occurrences": [
    42,
    666
  ],
  "orgId": "your_project",
  "orgName": "Organization Name",
  "pendingChanges": {
    "durationDays": 7
  },
  "pipelineId": "your_pipeline",
  "projectId": "your_project",
  "projectName": "Project Name",
  "reason": "Waiting on upstream bug fix",
  "requestedOn": 1651578240,
  "requesterEmail": "user@harness.io",
  "requesterId": "user111111111111111111",
  "requesterName": "firstname lastname",
  "reviewedOn": 1651578240,
  "scanId": "abcdef1234567890ghijkl",
  "scope": "PROJECT",
  "search": "CWE-123,5",
  "status": "Canceled",
  "targetId": "abcdef1234567890ghijkl",
  "type": "Other"
}

List exemption history for issue

get
/api/v2/exemptions/issue/{issueId}/history

Paginated flat timeline of exemption history events for an issue

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

Issue ID

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

Harness Account ID

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

Harness Organization ID

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

Harness Project ID

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

Page number to fetch (starting from 0)

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

Number of results per page

Default: 30Example: 50
pipelineIdstring · max: 128Optional

Harness pipeline ID. When set with targetId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.

Example: sto-core-ciPattern: ^[A-Za-z_][A-Za-z0-9_]*$
targetIdstringOptional

Harness target ID. When set with pipelineId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.

Example: target1111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Recusandae omnis.
Responses
200

OK response.

application/json
get/api/v2/exemptions/issue/{issueId}/history
GET /gateway/sto/api/v2/exemptions/issue/{issueId}/history?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "events": [
    {
      "comment": "kno",
      "commenterEmail": "priya.nair@harness.io",
      "commenterId": "user111111111111111111",
      "commenterName": "Priya Nair",
      "created": 1781391060,
      "durationDays": 1863109692595423000,
      "exemptedOccurrenceCount": 5259068024927412000,
      "exemptionId": "exmp111111111111111111",
      "expiration": 352069224179804000,
      "id": "hist111111111111111111",
      "isAutoExpiry": false,
      "isOccurrenceLevel": false,
      "orgId": "Nobis pariatur eos voluptatibus nesciunt similique dolor.",
      "orgName": "Default",
      "pipelineId": "Rem ullam explicabo.",
      "pipelineName": "STO Core CI",
      "projectId": "Nulla magnam assumenda doloremque consectetur.",
      "projectName": "STO Core",
      "reasonType": "Compensating Controls",
      "scope": "ORG",
      "status": "Rejected",
      "targetId": "Est reiciendis labore quis et.",
      "targetName": "sto-core"
    },
    {
      "comment": "kno",
      "commenterEmail": "priya.nair@harness.io",
      "commenterId": "user111111111111111111",
      "commenterName": "Priya Nair",
      "created": 1781391060,
      "durationDays": 1863109692595423000,
      "exemptedOccurrenceCount": 5259068024927412000,
      "exemptionId": "exmp111111111111111111",
      "expiration": 352069224179804000,
      "id": "hist111111111111111111",
      "isAutoExpiry": false,
      "isOccurrenceLevel": false,
      "orgId": "Nobis pariatur eos voluptatibus nesciunt similique dolor.",
      "orgName": "Default",
      "pipelineId": "Rem ullam explicabo.",
      "pipelineName": "STO Core CI",
      "projectId": "Nulla magnam assumenda doloremque consectetur.",
      "projectName": "STO Core",
      "reasonType": "Compensating Controls",
      "scope": "ORG",
      "status": "Rejected",
      "targetId": "Est reiciendis labore quis et.",
      "targetName": "sto-core"
    },
    {
      "comment": "kno",
      "commenterEmail": "priya.nair@harness.io",
      "commenterId": "user111111111111111111",
      "commenterName": "Priya Nair",
      "created": 1781391060,
      "durationDays": 1863109692595423000,
      "exemptedOccurrenceCount": 5259068024927412000,
      "exemptionId": "exmp111111111111111111",
      "expiration": 352069224179804000,
      "id": "hist111111111111111111",
      "isAutoExpiry": false,
      "isOccurrenceLevel": false,
      "orgId": "Nobis pariatur eos voluptatibus nesciunt similique dolor.",
      "orgName": "Default",
      "pipelineId": "Rem ullam explicabo.",
      "pipelineName": "STO Core CI",
      "projectId": "Nulla magnam assumenda doloremque consectetur.",
      "projectName": "STO Core",
      "reasonType": "Compensating Controls",
      "scope": "ORG",
      "status": "Rejected",
      "targetId": "Est reiciendis labore quis et.",
      "targetName": "sto-core"
    },
    {
      "comment": "kno",
      "commenterEmail": "priya.nair@harness.io",
      "commenterId": "user111111111111111111",
      "commenterName": "Priya Nair",
      "created": 1781391060,
      "durationDays": 1863109692595423000,
      "exemptedOccurrenceCount": 5259068024927412000,
      "exemptionId": "exmp111111111111111111",
      "expiration": 352069224179804000,
      "id": "hist111111111111111111",
      "isAutoExpiry": false,
      "isOccurrenceLevel": false,
      "orgId": "Nobis pariatur eos voluptatibus nesciunt similique dolor.",
      "orgName": "Default",
      "pipelineId": "Rem ullam explicabo.",
      "pipelineName": "STO Core CI",
      "projectId": "Nulla magnam assumenda doloremque consectetur.",
      "projectName": "STO Core",
      "reasonType": "Compensating Controls",
      "scope": "ORG",
      "status": "Rejected",
      "targetId": "Est reiciendis labore quis et.",
      "targetName": "sto-core"
    }
  ],
  "pagination": {
    "link": "",
    "page": 4,
    "pageSize": 20,
    "totalItems": 230,
    "totalPages": 12
  }
}

Export exemption history for issue as CSV

get
/api/v2/exemptions/issue/{issueId}/history/export

CSV export of the full exemption history timeline for an issue (fetch-all, no pagination)

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

Issue ID

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

Harness Account ID

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

Harness Organization ID

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

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
pipelineIdstring · max: 128Optional

Harness pipeline ID. When set with targetId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.

Example: sto-core-ciPattern: ^[A-Za-z_][A-Za-z0-9_]*$
targetIdstringOptional

Harness target ID. When set with pipelineId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.

Example: target1111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Sed voluptatem.
Responses
200

OK response.

application/json
filenamestringRequired

Suggested filename for download

Example: Totam omnis.
headersstring[]Required

CSV column headers

Example: ["Explicabo consequatur numquam commodi.","Voluptates incidunt in velit illo aut laboriosam.","Dolorum dolores optio delectus tenetur labore occaecati.","Omnis impedit sunt."]
issueIdstringRequired

Issue ID for this export

Example: Eaque qui eaque.
totalRowsinteger · int64Required

Total number of data rows

Example: 9133896228551028000
get/api/v2/exemptions/issue/{issueId}/history/export
GET /gateway/sto/api/v2/exemptions/issue/{issueId}/history/export?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    [
      "Et enim itaque laborum totam.",
      "Eligendi distinctio sequi porro asperiores labore.",
      "Voluptatem sapiente perspiciatis debitis aut.",
      "Minima quas ducimus blanditiis voluptas."
    ],
    [
      "Voluptatem eum nam sunt qui animi laborum.",
      "Ullam eos expedita impedit aut."
    ],
    [
      "Voluptatem quisquam veritatis.",
      "Qui est."
    ],
    [
      "Accusantium voluptas facere autem tenetur et.",
      "Quia tempora nobis minima."
    ]
  ],
  "filename": "Eum aut et qui eos rem.",
  "headers": [
    "Quis cupiditate.",
    "Omnis ipsum repellendus et.",
    "Tempore nisi."
  ],
  "issueId": "Iure illum ipsam accusantium.",
  "totalRows": 169356730981085800
}

Last updated

Was this helpful?