> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/api-reference/security-testing-agent-apis/security-testing-orchestration/exemptions.md).

# Exemptions

Access and modify Exemptions to Security Issues

## GET /api/v2/exemptions

> List a collection of Exemptions

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"Exemptions","description":"Access and modify Exemptions to Security Issues"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"X-Api-Key_header_X-Api-Key":[],"jwt_header_Authorization":["sto_exemption_view"]}],"components":{"securitySchemes":{"X-Api-Key_header_X-Api-Key":{"type":"apiKey","name":"X-Api-Key","in":"header"},"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"ExemptionsListExemptionsResponseBody":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Exemption"}}},"required":["results","pagination"]},"Pagination":{"type":"object","properties":{"link":{"type":"string","description":"Link-based paging"},"page":{"type":"integer","description":"Page number (starting from 0)","format":"int64"},"pageSize":{"type":"integer","description":"Requested page size","format":"int64"},"totalItems":{"type":"integer","description":"Total results available","format":"int64"},"totalPages":{"type":"integer","description":"Total pages available","format":"int64"}},"required":["page","pageSize","totalPages","totalItems"]},"Exemption":{"type":"object","properties":{"approverEmail":{"type":"string","description":"Email of the user who approved this Exemption"},"approverId":{"type":"string","description":"User ID the user who approved or rejected this exemptions","pattern":"^[a-zA-Z0-9_-]{22}$"},"approverName":{"type":"string","description":"Name of the user who approved this Exemption"},"canApproveFor":{"type":"array","items":{"type":"string","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"description":"Consists of RBAC scopes for an user associated with this Exemption"},"canCancel":{"type":"boolean","description":"States if the user can cancel the exemption","default":false},"canCreate":{"type":"boolean","description":"States whether the user can create or reopen the exemption","default":false},"canReApprove":{"type":"boolean","description":"States if the user can re-approve the exemption for the exemption's scope","default":false},"canReject":{"type":"boolean","description":"States whether the user can reject the exemption","default":false},"comment":{"type":"string","description":"The additional comment to include with the exemption"},"created":{"type":"integer","description":"Unix timestamp at which the resource was created","format":"int64"},"exemptionStatusAtScan":{"type":"string","description":"Exemption's status at the Security Scan created time","enum":["Pending","Approved","Rejected","Expired"]},"expiration":{"type":"integer","description":"Unix timestamp at which this Exemption will expire","format":"int64"},"id":{"type":"string","description":"Resource identifier","pattern":"^[a-zA-Z0-9_-]{22}$"},"isDeleted":{"type":"boolean","description":"States if the exemption is deleted","default":false},"issueId":{"type":"string","description":"Issue ID associated with the Exemption","pattern":"^[a-zA-Z0-9_-]{22}$"},"lastModified":{"type":"integer","description":"Unix timestamp at which the resource was most recently modified","format":"int64"},"link":{"type":"string","description":"Link to a related ticket","maxLength":1024},"numOccurrences":{"type":"integer","description":"States how may occurrences are associated with the exemption, if not an issue level exemption","default":0,"format":"int64"},"occurrences":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Array of occurrence Ids"},"orgId":{"type":"string","description":"ID of the Harness Organization to which the exemption applies. Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"orgName":{"type":"string","description":"Name of the organization associated with the exemption"},"pendingChanges":{"$ref":"#/components/schemas/PendingChanges"},"pipelineId":{"type":"string","description":"ID of the Harness Pipeline to which the exemption applies. You must also specify \"projectId\" and \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectId":{"type":"string","description":"ID of the Harness Project to which the exemption applies. You must also specify \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectName":{"type":"string","description":"Name of the project associated with the exemption"},"reason":{"type":"string","description":"Text describing why this Exemption is necessary","maxLength":1024},"requestedOn":{"type":"integer","description":"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.","format":"int64"},"requesterEmail":{"type":"string","description":"Email of the user who requested this Exemption"},"requesterId":{"type":"string","description":"User ID of the user who requested this Exemption"},"requesterName":{"type":"string","description":"Name of the user who requested this Exemption"},"reviewedOn":{"type":"integer","description":"Unix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.","format":"int64"},"scanId":{"type":"string","description":"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\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"scope":{"type":"string","description":"States the scope for the exemption","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"search":{"type":"string","description":"Search parameter to find filtered occurrences of the issue","maxLength":256},"status":{"type":"string","description":"Approval status of Exemption","default":"Pending","enum":["Pending","Approved","Rejected","Expired","Canceled"]},"targetId":{"type":"string","description":"ID of the Target to which the exemption applies. Cannot be specified alongside \"projectId\" or \"pipelineId\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"type":{"type":"string","description":"Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)","enum":["Compensating Controls","Acceptable Use","Acceptable Risk","False Positive","Fix Unavailable","Other"]}},"description":"Information about an Exemption","required":["type","reason","pendingChanges","issueId","status","requesterId","id","created","lastModified"]},"PendingChanges":{"type":"object","properties":{"durationDays":{"type":"integer","description":"The number of days an issue should be exempted for","format":"int64"}}},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/exemptions":{"get":{"tags":["Exemptions"],"description":"List a collection of Exemptions","operationId":"Exemptions#ListExemptions","parameters":[{"name":"accountId","in":"query","description":"Harness Account ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"page","in":"query","description":"Page number to fetch (starting from 0)","allowEmptyValue":true,"schema":{"type":"integer","description":"Page number to fetch (starting from 0)","default":0,"format":"int64","minimum":0}},{"name":"pageSize","in":"query","description":"Number of results per page","allowEmptyValue":true,"schema":{"type":"integer","description":"Number of results per page","default":30,"format":"int64","minimum":1,"maximum":100}},{"name":"orgId","in":"query","description":"Harness Organization ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Organization ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"projectId","in":"query","description":"Harness Project ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Project ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"X-Api-Key","in":"header","description":"Harness personal or service access token","allowEmptyValue":true,"schema":{"type":"string","description":"Harness personal or service access token"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExemptionsListExemptionsResponseBody"}}}},"400":{"description":"BadRequest: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"401":{"description":"Unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"403":{"description":"Forbidden: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"404":{"description":"NotFound: Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"429":{"description":"TooManyRequests: Too Many Requests response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## POST /api/v2/exemptions

> Create a new Exemption

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"Exemptions","description":"Access and modify Exemptions to Security Issues"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"X-Api-Key_header_X-Api-Key":[],"jwt_header_Authorization":["sto_exemption_create"]}],"components":{"securitySchemes":{"X-Api-Key_header_X-Api-Key":{"type":"apiKey","name":"X-Api-Key","in":"header"},"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"CreateExemptionRequestBody":{"type":"object","properties":{"exemptFutureOccurrences":{"type":"boolean","description":"States if the user wants to exempt future occurrences of the issue","default":true},"expiration":{"type":"integer","description":"Unix timestamp at which this Exemption will expire","format":"int64"},"issueId":{"type":"string","description":"Issue ID associated with the Exemption","pattern":"^[a-zA-Z0-9_-]{22}$"},"link":{"type":"string","description":"Link to a related ticket","maxLength":1024},"occurrences":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Array of occurrence Ids"},"pendingChanges":{"$ref":"#/components/schemas/PendingChanges"},"pipelineId":{"type":"string","description":"ID of the Harness Pipeline to which the exemption applies. You must also specify \"projectId\" and \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"reason":{"type":"string","description":"Text describing why this Exemption is necessary","maxLength":1024},"requesterEmail":{"type":"string","description":"Email of the user who requested this Exemption"},"requesterName":{"type":"string","description":"Name of the user who requested this Exemption"},"scanId":{"type":"string","description":"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\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"search":{"type":"string","description":"Search parameter to find filtered occurrences of the issue","maxLength":256},"targetId":{"type":"string","description":"ID of the Target to which the exemption applies. Cannot be specified alongside \"projectId\" or \"pipelineId\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"type":{"type":"string","description":"Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)","enum":["Compensating Controls","Acceptable Use","Acceptable Risk","False Positive","Fix Unavailable","Other"]}},"required":["type","reason","pendingChanges","issueId","status","requesterId","id","created","lastModified"]},"PendingChanges":{"type":"object","properties":{"durationDays":{"type":"integer","description":"The number of days an issue should be exempted for","format":"int64"}}},"ExemptionRulesCreateExemptionRuleResponseBody":{"$ref":"#/components/schemas/IDResult"},"IDResult":{"type":"object","properties":{"id":{"type":"string","description":"Resource identifier","pattern":"^[a-zA-Z0-9_-]{22}$"}},"required":["id"]},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/exemptions":{"post":{"tags":["Exemptions"],"description":"Create a new Exemption","operationId":"Exemptions#CreateExemption","parameters":[{"name":"accountId","in":"query","description":"Harness Account ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"orgId","in":"query","description":"ID of the Harness Organization to which the exemption applies. Cannot be specified alongside \"targetId\".","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"ID of the Harness Organization to which the exemption applies. Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"projectId","in":"query","description":"ID of the Harness Project to which the exemption applies. You must also specify \"orgId\". Cannot be specified alongside \"targetId\".","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"ID of the Harness Project to which the exemption applies. You must also specify \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"X-Api-Key","in":"header","description":"Harness personal or service access token","allowEmptyValue":true,"schema":{"type":"string","description":"Harness personal or service access token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExemptionRequestBody"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExemptionRulesCreateExemptionRuleResponseBody"}}}},"400":{"description":"BadRequest: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"401":{"description":"Unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"403":{"description":"Forbidden: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"429":{"description":"TooManyRequests: Too Many Requests response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## GET /api/v2/exemptions/{id}

> Find Exemption by ID

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"Exemptions","description":"Access and modify Exemptions to Security Issues"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"X-Api-Key_header_X-Api-Key":[],"jwt_header_Authorization":["sto_exemption_view"]}],"components":{"securitySchemes":{"X-Api-Key_header_X-Api-Key":{"type":"apiKey","name":"X-Api-Key","in":"header"},"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"Exemption":{"type":"object","properties":{"approverEmail":{"type":"string","description":"Email of the user who approved this Exemption"},"approverId":{"type":"string","description":"User ID the user who approved or rejected this exemptions","pattern":"^[a-zA-Z0-9_-]{22}$"},"approverName":{"type":"string","description":"Name of the user who approved this Exemption"},"canApproveFor":{"type":"array","items":{"type":"string","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"description":"Consists of RBAC scopes for an user associated with this Exemption"},"canCancel":{"type":"boolean","description":"States if the user can cancel the exemption","default":false},"canCreate":{"type":"boolean","description":"States whether the user can create or reopen the exemption","default":false},"canReApprove":{"type":"boolean","description":"States if the user can re-approve the exemption for the exemption's scope","default":false},"canReject":{"type":"boolean","description":"States whether the user can reject the exemption","default":false},"comment":{"type":"string","description":"The additional comment to include with the exemption"},"created":{"type":"integer","description":"Unix timestamp at which the resource was created","format":"int64"},"exemptionStatusAtScan":{"type":"string","description":"Exemption's status at the Security Scan created time","enum":["Pending","Approved","Rejected","Expired"]},"expiration":{"type":"integer","description":"Unix timestamp at which this Exemption will expire","format":"int64"},"id":{"type":"string","description":"Resource identifier","pattern":"^[a-zA-Z0-9_-]{22}$"},"isDeleted":{"type":"boolean","description":"States if the exemption is deleted","default":false},"issueId":{"type":"string","description":"Issue ID associated with the Exemption","pattern":"^[a-zA-Z0-9_-]{22}$"},"lastModified":{"type":"integer","description":"Unix timestamp at which the resource was most recently modified","format":"int64"},"link":{"type":"string","description":"Link to a related ticket","maxLength":1024},"numOccurrences":{"type":"integer","description":"States how may occurrences are associated with the exemption, if not an issue level exemption","default":0,"format":"int64"},"occurrences":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Array of occurrence Ids"},"orgId":{"type":"string","description":"ID of the Harness Organization to which the exemption applies. Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"orgName":{"type":"string","description":"Name of the organization associated with the exemption"},"pendingChanges":{"$ref":"#/components/schemas/PendingChanges"},"pipelineId":{"type":"string","description":"ID of the Harness Pipeline to which the exemption applies. You must also specify \"projectId\" and \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectId":{"type":"string","description":"ID of the Harness Project to which the exemption applies. You must also specify \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectName":{"type":"string","description":"Name of the project associated with the exemption"},"reason":{"type":"string","description":"Text describing why this Exemption is necessary","maxLength":1024},"requestedOn":{"type":"integer","description":"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.","format":"int64"},"requesterEmail":{"type":"string","description":"Email of the user who requested this Exemption"},"requesterId":{"type":"string","description":"User ID of the user who requested this Exemption"},"requesterName":{"type":"string","description":"Name of the user who requested this Exemption"},"reviewedOn":{"type":"integer","description":"Unix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.","format":"int64"},"scanId":{"type":"string","description":"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\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"scope":{"type":"string","description":"States the scope for the exemption","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"search":{"type":"string","description":"Search parameter to find filtered occurrences of the issue","maxLength":256},"status":{"type":"string","description":"Approval status of Exemption","default":"Pending","enum":["Pending","Approved","Rejected","Expired","Canceled"]},"targetId":{"type":"string","description":"ID of the Target to which the exemption applies. Cannot be specified alongside \"projectId\" or \"pipelineId\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"type":{"type":"string","description":"Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)","enum":["Compensating Controls","Acceptable Use","Acceptable Risk","False Positive","Fix Unavailable","Other"]}},"description":"Information about an Exemption","required":["type","reason","pendingChanges","issueId","status","requesterId","id","created","lastModified"]},"PendingChanges":{"type":"object","properties":{"durationDays":{"type":"integer","description":"The number of days an issue should be exempted for","format":"int64"}}},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/exemptions/{id}":{"get":{"tags":["Exemptions"],"description":"Find Exemption by ID","operationId":"Exemptions#FindExemptionById","parameters":[{"name":"accountId","in":"query","description":"Harness Account ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"orgId","in":"query","description":"Harness Organization ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Organization ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"projectId","in":"query","description":"Harness Project ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Project ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"executionId","in":"query","description":"Harness Execution ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Execution ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"ignoreScope","in":"query","description":"Ignore scope","allowEmptyValue":true,"schema":{"type":"boolean","description":"Ignore scope"}},{"name":"id","in":"path","description":"The ID of the Exemption to retrieve","required":true,"schema":{"type":"string","description":"The ID of the Exemption to retrieve","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"X-Api-Key","in":"header","description":"Harness personal or service access token","allowEmptyValue":true,"schema":{"type":"string","description":"Harness personal or service access token"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Exemption"}}}},"400":{"description":"BadRequest: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"401":{"description":"Unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"403":{"description":"Forbidden: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"404":{"description":"NotFound: Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"429":{"description":"TooManyRequests: Too Many Requests response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## PUT /api/v2/exemptions/{id}

> Update an existing Exemption

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"Exemptions","description":"Access and modify Exemptions to Security Issues"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"X-Api-Key_header_X-Api-Key":[],"jwt_header_Authorization":["sto_exemption_create"]}],"components":{"securitySchemes":{"X-Api-Key_header_X-Api-Key":{"type":"apiKey","name":"X-Api-Key","in":"header"},"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"UpdateExemptionRequestBody":{"type":"object","properties":{"expiration":{"type":"integer","description":"Unix timestamp at which this Exemption will expire","format":"int64"},"link":{"type":"string","description":"Link to a related ticket","maxLength":1024},"pendingChanges":{"$ref":"#/components/schemas/PendingChanges"},"pipelineId":{"type":"string","description":"ID of the Harness Pipeline to which the exemption applies. You must also specify \"projectId\" and \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"reason":{"type":"string","description":"Text describing why this Exemption is necessary","maxLength":1024},"requesterEmail":{"type":"string","description":"Email of the user who requested this Exemption"},"requesterName":{"type":"string","description":"Name of the user who requested this Exemption"},"targetId":{"type":"string","description":"ID of the Target to which the exemption applies. Cannot be specified alongside \"projectId\" or \"pipelineId\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"type":{"type":"string","description":"Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)","enum":["Compensating Controls","Acceptable Use","Acceptable Risk","False Positive","Fix Unavailable","Other"]}},"required":["type","reason","pendingChanges","issueId","status","requesterId","created","lastModified"]},"PendingChanges":{"type":"object","properties":{"durationDays":{"type":"integer","description":"The number of days an issue should be exempted for","format":"int64"}}},"Exemption":{"type":"object","properties":{"approverEmail":{"type":"string","description":"Email of the user who approved this Exemption"},"approverId":{"type":"string","description":"User ID the user who approved or rejected this exemptions","pattern":"^[a-zA-Z0-9_-]{22}$"},"approverName":{"type":"string","description":"Name of the user who approved this Exemption"},"canApproveFor":{"type":"array","items":{"type":"string","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"description":"Consists of RBAC scopes for an user associated with this Exemption"},"canCancel":{"type":"boolean","description":"States if the user can cancel the exemption","default":false},"canCreate":{"type":"boolean","description":"States whether the user can create or reopen the exemption","default":false},"canReApprove":{"type":"boolean","description":"States if the user can re-approve the exemption for the exemption's scope","default":false},"canReject":{"type":"boolean","description":"States whether the user can reject the exemption","default":false},"comment":{"type":"string","description":"The additional comment to include with the exemption"},"created":{"type":"integer","description":"Unix timestamp at which the resource was created","format":"int64"},"exemptionStatusAtScan":{"type":"string","description":"Exemption's status at the Security Scan created time","enum":["Pending","Approved","Rejected","Expired"]},"expiration":{"type":"integer","description":"Unix timestamp at which this Exemption will expire","format":"int64"},"id":{"type":"string","description":"Resource identifier","pattern":"^[a-zA-Z0-9_-]{22}$"},"isDeleted":{"type":"boolean","description":"States if the exemption is deleted","default":false},"issueId":{"type":"string","description":"Issue ID associated with the Exemption","pattern":"^[a-zA-Z0-9_-]{22}$"},"lastModified":{"type":"integer","description":"Unix timestamp at which the resource was most recently modified","format":"int64"},"link":{"type":"string","description":"Link to a related ticket","maxLength":1024},"numOccurrences":{"type":"integer","description":"States how may occurrences are associated with the exemption, if not an issue level exemption","default":0,"format":"int64"},"occurrences":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Array of occurrence Ids"},"orgId":{"type":"string","description":"ID of the Harness Organization to which the exemption applies. Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"orgName":{"type":"string","description":"Name of the organization associated with the exemption"},"pendingChanges":{"$ref":"#/components/schemas/PendingChanges"},"pipelineId":{"type":"string","description":"ID of the Harness Pipeline to which the exemption applies. You must also specify \"projectId\" and \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectId":{"type":"string","description":"ID of the Harness Project to which the exemption applies. You must also specify \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectName":{"type":"string","description":"Name of the project associated with the exemption"},"reason":{"type":"string","description":"Text describing why this Exemption is necessary","maxLength":1024},"requestedOn":{"type":"integer","description":"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.","format":"int64"},"requesterEmail":{"type":"string","description":"Email of the user who requested this Exemption"},"requesterId":{"type":"string","description":"User ID of the user who requested this Exemption"},"requesterName":{"type":"string","description":"Name of the user who requested this Exemption"},"reviewedOn":{"type":"integer","description":"Unix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.","format":"int64"},"scanId":{"type":"string","description":"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\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"scope":{"type":"string","description":"States the scope for the exemption","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"search":{"type":"string","description":"Search parameter to find filtered occurrences of the issue","maxLength":256},"status":{"type":"string","description":"Approval status of Exemption","default":"Pending","enum":["Pending","Approved","Rejected","Expired","Canceled"]},"targetId":{"type":"string","description":"ID of the Target to which the exemption applies. Cannot be specified alongside \"projectId\" or \"pipelineId\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"type":{"type":"string","description":"Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)","enum":["Compensating Controls","Acceptable Use","Acceptable Risk","False Positive","Fix Unavailable","Other"]}},"description":"Information about an Exemption","required":["type","reason","pendingChanges","issueId","status","requesterId","id","created","lastModified"]},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/exemptions/{id}":{"put":{"tags":["Exemptions"],"description":"Update an existing Exemption","operationId":"Exemptions#UpdateExemption","parameters":[{"name":"accountId","in":"query","description":"Harness Account ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"orgId","in":"query","description":"ID of the Harness Organization to which the exemption applies. Cannot be specified alongside \"targetId\".","allowEmptyValue":true,"schema":{"type":"string","description":"ID of the Harness Organization to which the exemption applies. Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"projectId","in":"query","description":"ID of the Harness Project to which the exemption applies. You must also specify \"orgId\". Cannot be specified alongside \"targetId\".","allowEmptyValue":true,"schema":{"type":"string","description":"ID of the Harness Project to which the exemption applies. You must also specify \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"id","in":"path","description":"The ID of the Exemption to update","required":true,"schema":{"type":"string","description":"The ID of the Exemption to update","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"X-Api-Key","in":"header","description":"Harness personal or service access token","allowEmptyValue":true,"schema":{"type":"string","description":"Harness personal or service access token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExemptionRequestBody"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Exemption"}}}},"400":{"description":"BadRequest: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"401":{"description":"Unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"403":{"description":"Forbidden: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"404":{"description":"NotFound: Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"429":{"description":"TooManyRequests: Too Many Requests response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## PUT /api/v2/exemptions/{id}/{action}

> Approve/reject an existing Exemption

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"Exemptions","description":"Access and modify Exemptions to Security Issues"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"X-Api-Key_header_X-Api-Key":[],"jwt_header_Authorization":["sto_exemption_approve"]}],"components":{"securitySchemes":{"X-Api-Key_header_X-Api-Key":{"type":"apiKey","name":"X-Api-Key","in":"header"},"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"ApproveExemptionRequestBody":{"type":"object","properties":{"comment":{"type":"string","description":"Comment to be added to the Exemption approval or rejection","maxLength":1024},"pendingChangesOverride":{"$ref":"#/components/schemas/PendingChanges"}},"required":["type","reason","pendingChanges","issueId","status","requesterId","created","lastModified"]},"PendingChanges":{"type":"object","properties":{"durationDays":{"type":"integer","description":"The number of days an issue should be exempted for","format":"int64"}}},"Exemption":{"type":"object","properties":{"approverEmail":{"type":"string","description":"Email of the user who approved this Exemption"},"approverId":{"type":"string","description":"User ID the user who approved or rejected this exemptions","pattern":"^[a-zA-Z0-9_-]{22}$"},"approverName":{"type":"string","description":"Name of the user who approved this Exemption"},"canApproveFor":{"type":"array","items":{"type":"string","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"description":"Consists of RBAC scopes for an user associated with this Exemption"},"canCancel":{"type":"boolean","description":"States if the user can cancel the exemption","default":false},"canCreate":{"type":"boolean","description":"States whether the user can create or reopen the exemption","default":false},"canReApprove":{"type":"boolean","description":"States if the user can re-approve the exemption for the exemption's scope","default":false},"canReject":{"type":"boolean","description":"States whether the user can reject the exemption","default":false},"comment":{"type":"string","description":"The additional comment to include with the exemption"},"created":{"type":"integer","description":"Unix timestamp at which the resource was created","format":"int64"},"exemptionStatusAtScan":{"type":"string","description":"Exemption's status at the Security Scan created time","enum":["Pending","Approved","Rejected","Expired"]},"expiration":{"type":"integer","description":"Unix timestamp at which this Exemption will expire","format":"int64"},"id":{"type":"string","description":"Resource identifier","pattern":"^[a-zA-Z0-9_-]{22}$"},"isDeleted":{"type":"boolean","description":"States if the exemption is deleted","default":false},"issueId":{"type":"string","description":"Issue ID associated with the Exemption","pattern":"^[a-zA-Z0-9_-]{22}$"},"lastModified":{"type":"integer","description":"Unix timestamp at which the resource was most recently modified","format":"int64"},"link":{"type":"string","description":"Link to a related ticket","maxLength":1024},"numOccurrences":{"type":"integer","description":"States how may occurrences are associated with the exemption, if not an issue level exemption","default":0,"format":"int64"},"occurrences":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Array of occurrence Ids"},"orgId":{"type":"string","description":"ID of the Harness Organization to which the exemption applies. Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"orgName":{"type":"string","description":"Name of the organization associated with the exemption"},"pendingChanges":{"$ref":"#/components/schemas/PendingChanges"},"pipelineId":{"type":"string","description":"ID of the Harness Pipeline to which the exemption applies. You must also specify \"projectId\" and \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectId":{"type":"string","description":"ID of the Harness Project to which the exemption applies. You must also specify \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectName":{"type":"string","description":"Name of the project associated with the exemption"},"reason":{"type":"string","description":"Text describing why this Exemption is necessary","maxLength":1024},"requestedOn":{"type":"integer","description":"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.","format":"int64"},"requesterEmail":{"type":"string","description":"Email of the user who requested this Exemption"},"requesterId":{"type":"string","description":"User ID of the user who requested this Exemption"},"requesterName":{"type":"string","description":"Name of the user who requested this Exemption"},"reviewedOn":{"type":"integer","description":"Unix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.","format":"int64"},"scanId":{"type":"string","description":"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\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"scope":{"type":"string","description":"States the scope for the exemption","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"search":{"type":"string","description":"Search parameter to find filtered occurrences of the issue","maxLength":256},"status":{"type":"string","description":"Approval status of Exemption","default":"Pending","enum":["Pending","Approved","Rejected","Expired","Canceled"]},"targetId":{"type":"string","description":"ID of the Target to which the exemption applies. Cannot be specified alongside \"projectId\" or \"pipelineId\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"type":{"type":"string","description":"Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)","enum":["Compensating Controls","Acceptable Use","Acceptable Risk","False Positive","Fix Unavailable","Other"]}},"description":"Information about an Exemption","required":["type","reason","pendingChanges","issueId","status","requesterId","id","created","lastModified"]},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/exemptions/{id}/{action}":{"put":{"tags":["Exemptions"],"description":"Approve/reject an existing Exemption","operationId":"Exemptions#ApproveExemption","parameters":[{"name":"accountId","in":"query","description":"Harness Account ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"orgId","in":"query","description":"Harness Organization ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Organization ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"projectId","in":"query","description":"Harness Project ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Project ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"id","in":"path","description":"The ID of the Exemption to update","required":true,"schema":{"type":"string","description":"The ID of the Exemption to update","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"action","in":"path","description":"The approval action to take on the Exemption","required":true,"schema":{"type":"string","description":"The approval action to take on the Exemption","enum":["approve","reject"]}},{"name":"X-Api-Key","in":"header","description":"Harness personal or service access token","allowEmptyValue":true,"schema":{"type":"string","description":"Harness personal or service access token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveExemptionRequestBody"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Exemption"}}}},"400":{"description":"BadRequest: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"401":{"description":"Unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"403":{"description":"Forbidden: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"404":{"description":"NotFound: Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"429":{"description":"TooManyRequests: Too Many Requests response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## PUT /api/v2/exemptions/{id}/promote

> Promote an existing Exemption to a higher scope

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"Exemptions","description":"Access and modify Exemptions to Security Issues"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"X-Api-Key_header_X-Api-Key":[],"jwt_header_Authorization":["sto_exemption_approve"]}],"components":{"securitySchemes":{"X-Api-Key_header_X-Api-Key":{"type":"apiKey","name":"X-Api-Key","in":"header"},"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"PromoteExemptionRequestBody":{"type":"object","properties":{"comment":{"type":"string","description":"Comment to be added to the Exemption approval or rejection","maxLength":1024},"pendingChangesOverride":{"$ref":"#/components/schemas/PendingChanges"},"pipelineId":{"type":"string","description":"Harness STO pipeline ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"targetId":{"type":"string","description":"Harness STO Target ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},"required":["type","reason","pendingChanges","issueId","status","requesterId","created","lastModified"]},"PendingChanges":{"type":"object","properties":{"durationDays":{"type":"integer","description":"The number of days an issue should be exempted for","format":"int64"}}},"Exemption":{"type":"object","properties":{"approverEmail":{"type":"string","description":"Email of the user who approved this Exemption"},"approverId":{"type":"string","description":"User ID the user who approved or rejected this exemptions","pattern":"^[a-zA-Z0-9_-]{22}$"},"approverName":{"type":"string","description":"Name of the user who approved this Exemption"},"canApproveFor":{"type":"array","items":{"type":"string","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"description":"Consists of RBAC scopes for an user associated with this Exemption"},"canCancel":{"type":"boolean","description":"States if the user can cancel the exemption","default":false},"canCreate":{"type":"boolean","description":"States whether the user can create or reopen the exemption","default":false},"canReApprove":{"type":"boolean","description":"States if the user can re-approve the exemption for the exemption's scope","default":false},"canReject":{"type":"boolean","description":"States whether the user can reject the exemption","default":false},"comment":{"type":"string","description":"The additional comment to include with the exemption"},"created":{"type":"integer","description":"Unix timestamp at which the resource was created","format":"int64"},"exemptionStatusAtScan":{"type":"string","description":"Exemption's status at the Security Scan created time","enum":["Pending","Approved","Rejected","Expired"]},"expiration":{"type":"integer","description":"Unix timestamp at which this Exemption will expire","format":"int64"},"id":{"type":"string","description":"Resource identifier","pattern":"^[a-zA-Z0-9_-]{22}$"},"isDeleted":{"type":"boolean","description":"States if the exemption is deleted","default":false},"issueId":{"type":"string","description":"Issue ID associated with the Exemption","pattern":"^[a-zA-Z0-9_-]{22}$"},"lastModified":{"type":"integer","description":"Unix timestamp at which the resource was most recently modified","format":"int64"},"link":{"type":"string","description":"Link to a related ticket","maxLength":1024},"numOccurrences":{"type":"integer","description":"States how may occurrences are associated with the exemption, if not an issue level exemption","default":0,"format":"int64"},"occurrences":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Array of occurrence Ids"},"orgId":{"type":"string","description":"ID of the Harness Organization to which the exemption applies. Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"orgName":{"type":"string","description":"Name of the organization associated with the exemption"},"pendingChanges":{"$ref":"#/components/schemas/PendingChanges"},"pipelineId":{"type":"string","description":"ID of the Harness Pipeline to which the exemption applies. You must also specify \"projectId\" and \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectId":{"type":"string","description":"ID of the Harness Project to which the exemption applies. You must also specify \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectName":{"type":"string","description":"Name of the project associated with the exemption"},"reason":{"type":"string","description":"Text describing why this Exemption is necessary","maxLength":1024},"requestedOn":{"type":"integer","description":"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.","format":"int64"},"requesterEmail":{"type":"string","description":"Email of the user who requested this Exemption"},"requesterId":{"type":"string","description":"User ID of the user who requested this Exemption"},"requesterName":{"type":"string","description":"Name of the user who requested this Exemption"},"reviewedOn":{"type":"integer","description":"Unix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.","format":"int64"},"scanId":{"type":"string","description":"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\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"scope":{"type":"string","description":"States the scope for the exemption","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"search":{"type":"string","description":"Search parameter to find filtered occurrences of the issue","maxLength":256},"status":{"type":"string","description":"Approval status of Exemption","default":"Pending","enum":["Pending","Approved","Rejected","Expired","Canceled"]},"targetId":{"type":"string","description":"ID of the Target to which the exemption applies. Cannot be specified alongside \"projectId\" or \"pipelineId\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"type":{"type":"string","description":"Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)","enum":["Compensating Controls","Acceptable Use","Acceptable Risk","False Positive","Fix Unavailable","Other"]}},"description":"Information about an Exemption","required":["type","reason","pendingChanges","issueId","status","requesterId","id","created","lastModified"]},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/exemptions/{id}/promote":{"put":{"tags":["Exemptions"],"description":"Promote an existing Exemption to a higher scope","operationId":"Exemptions#PromoteExemption","parameters":[{"name":"accountId","in":"query","description":"Harness Account ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"orgId","in":"query","description":"Harness Organization ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Organization ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"projectId","in":"query","description":"Harness Project ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Project ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"id","in":"path","description":"The ID of the Exemption to promote","required":true,"schema":{"type":"string","description":"The ID of the Exemption to promote","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"X-Api-Key","in":"header","description":"Harness personal or service access token","allowEmptyValue":true,"schema":{"type":"string","description":"Harness personal or service access token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoteExemptionRequestBody"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Exemption"}}}},"400":{"description":"BadRequest: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"401":{"description":"Unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"403":{"description":"Forbidden: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"404":{"description":"NotFound: Not Found response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"429":{"description":"TooManyRequests: Too Many Requests response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## Bulk create exemptions

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

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"Exemptions","description":"Access and modify Exemptions to Security Issues"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"X-Api-Key_header_X-Api-Key":[],"jwt_header_Authorization":["sto_exemption_create"]}],"components":{"securitySchemes":{"X-Api-Key_header_X-Api-Key":{"type":"apiKey","name":"X-Api-Key","in":"header"},"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"BulkCreateExemptionsRequestBody":{"type":"object","properties":{"exemptFutureOccurrences":{"type":"boolean","description":"Whether to exempt future occurrences of each issue","default":true},"expiration":{"type":"integer","description":"Unix timestamp at which these Exemptions will expire","format":"int64"},"items":{"type":"array","items":{"$ref":"#/components/schemas/BulkExemptionItem"},"description":"List of exemption items to create (max 100)","minItems":1,"maxItems":100},"link":{"type":"string","description":"Link to a related ticket","maxLength":1024},"pendingChanges":{"$ref":"#/components/schemas/PendingChanges"},"reason":{"type":"string","description":"Text describing why these Exemptions are necessary","maxLength":1024},"requesterEmail":{"type":"string","description":"Email of the user who requested these Exemptions"},"requesterName":{"type":"string","description":"Name of the user who requested these Exemptions"},"type":{"type":"string","description":"Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)","enum":["Compensating Controls","Acceptable Use","Acceptable Risk","False Positive","Fix Unavailable","Other"]}},"required":["type","reason","pendingChanges","items"]},"BulkExemptionItem":{"type":"object","properties":{"issueId":{"type":"string","description":"Issue ID associated with the Exemption","pattern":"^[a-zA-Z0-9_-]{22}$"},"occurrences":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Array of occurrence IDs"},"pipelineId":{"type":"string","description":"ID of the Harness Pipeline to which the exemption applies. Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"scanId":{"type":"string","description":"ID of the Harness Scan to determine all occurrences for the scan-issue.","pattern":"^[a-zA-Z0-9_-]{22}$"},"search":{"type":"string","description":"Search parameter to find filtered occurrences of the issue","maxLength":256},"targetId":{"type":"string","description":"ID of the Target to which the exemption applies. Cannot be specified alongside \"pipelineId\".","pattern":"^[a-zA-Z0-9_-]{22}$"}},"required":["issueId"]},"PendingChanges":{"type":"object","properties":{"durationDays":{"type":"integer","description":"The number of days an issue should be exempted for","format":"int64"}}},"ExemptionsBulkCreateExemptionsResponseBody":{"$ref":"#/components/schemas/BulkExemptionResult"},"BulkExemptionResult":{"type":"object","properties":{"failed":{"type":"integer","description":"Number of failed exemption creations","format":"int64"},"results":{"type":"array","items":{"$ref":"#/components/schemas/BulkExemptionItemResult"},"description":"Per-item results in the same order as the request items"},"succeeded":{"type":"integer","description":"Number of successfully created exemptions","format":"int64"}},"required":["results","succeeded","failed"]},"BulkExemptionItemResult":{"type":"object","properties":{"error":{"type":"string","description":"Error message (populated on failure)"},"id":{"type":"string","description":"ID of the created exemption (populated on success)"},"issueId":{"type":"string","description":"Issue ID of the exemption item"},"statusCode":{"type":"integer","description":"HTTP status code for this item (201 on success, 4xx/5xx on failure)","format":"int64"}},"required":["issueId","statusCode"]},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/exemptions/bulk":{"post":{"tags":["Exemptions"],"summary":"Bulk create exemptions","description":"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.","operationId":"Exemptions#BulkCreateExemptions","parameters":[{"name":"accountId","in":"query","description":"Harness Account ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"orgId","in":"query","description":"Harness Organization ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Organization ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"projectId","in":"query","description":"Harness Project ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Project ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"X-Api-Key","in":"header","description":"Harness personal or service access token","allowEmptyValue":true,"schema":{"type":"string","description":"Harness personal or service access token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateExemptionsRequestBody"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExemptionsBulkCreateExemptionsResponseBody"}}}},"400":{"description":"BadRequest: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"401":{"description":"Unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"403":{"description":"Forbidden: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"429":{"description":"TooManyRequests: Too Many Requests response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## Get exemption for issue

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

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"Exemptions","description":"Access and modify Exemptions to Security Issues"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"X-Api-Key_header_X-Api-Key":[],"jwt_header_Authorization":["sto_exemption_view"]}],"components":{"securitySchemes":{"X-Api-Key_header_X-Api-Key":{"type":"apiKey","name":"X-Api-Key","in":"header"},"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"Exemption":{"type":"object","properties":{"approverEmail":{"type":"string","description":"Email of the user who approved this Exemption"},"approverId":{"type":"string","description":"User ID the user who approved or rejected this exemptions","pattern":"^[a-zA-Z0-9_-]{22}$"},"approverName":{"type":"string","description":"Name of the user who approved this Exemption"},"canApproveFor":{"type":"array","items":{"type":"string","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"description":"Consists of RBAC scopes for an user associated with this Exemption"},"canCancel":{"type":"boolean","description":"States if the user can cancel the exemption","default":false},"canCreate":{"type":"boolean","description":"States whether the user can create or reopen the exemption","default":false},"canReApprove":{"type":"boolean","description":"States if the user can re-approve the exemption for the exemption's scope","default":false},"canReject":{"type":"boolean","description":"States whether the user can reject the exemption","default":false},"comment":{"type":"string","description":"The additional comment to include with the exemption"},"created":{"type":"integer","description":"Unix timestamp at which the resource was created","format":"int64"},"exemptionStatusAtScan":{"type":"string","description":"Exemption's status at the Security Scan created time","enum":["Pending","Approved","Rejected","Expired"]},"expiration":{"type":"integer","description":"Unix timestamp at which this Exemption will expire","format":"int64"},"id":{"type":"string","description":"Resource identifier","pattern":"^[a-zA-Z0-9_-]{22}$"},"isDeleted":{"type":"boolean","description":"States if the exemption is deleted","default":false},"issueId":{"type":"string","description":"Issue ID associated with the Exemption","pattern":"^[a-zA-Z0-9_-]{22}$"},"lastModified":{"type":"integer","description":"Unix timestamp at which the resource was most recently modified","format":"int64"},"link":{"type":"string","description":"Link to a related ticket","maxLength":1024},"numOccurrences":{"type":"integer","description":"States how may occurrences are associated with the exemption, if not an issue level exemption","default":0,"format":"int64"},"occurrences":{"type":"array","items":{"type":"integer","format":"int64"},"description":"Array of occurrence Ids"},"orgId":{"type":"string","description":"ID of the Harness Organization to which the exemption applies. Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"orgName":{"type":"string","description":"Name of the organization associated with the exemption"},"pendingChanges":{"$ref":"#/components/schemas/PendingChanges"},"pipelineId":{"type":"string","description":"ID of the Harness Pipeline to which the exemption applies. You must also specify \"projectId\" and \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectId":{"type":"string","description":"ID of the Harness Project to which the exemption applies. You must also specify \"orgId\". Cannot be specified alongside \"targetId\".","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128},"projectName":{"type":"string","description":"Name of the project associated with the exemption"},"reason":{"type":"string","description":"Text describing why this Exemption is necessary","maxLength":1024},"requestedOn":{"type":"integer","description":"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.","format":"int64"},"requesterEmail":{"type":"string","description":"Email of the user who requested this Exemption"},"requesterId":{"type":"string","description":"User ID of the user who requested this Exemption"},"requesterName":{"type":"string","description":"Name of the user who requested this Exemption"},"reviewedOn":{"type":"integer","description":"Unix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.","format":"int64"},"scanId":{"type":"string","description":"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\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"scope":{"type":"string","description":"States the scope for the exemption","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"search":{"type":"string","description":"Search parameter to find filtered occurrences of the issue","maxLength":256},"status":{"type":"string","description":"Approval status of Exemption","default":"Pending","enum":["Pending","Approved","Rejected","Expired","Canceled"]},"targetId":{"type":"string","description":"ID of the Target to which the exemption applies. Cannot be specified alongside \"projectId\" or \"pipelineId\".","pattern":"^[a-zA-Z0-9_-]{22}$"},"type":{"type":"string","description":"Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)","enum":["Compensating Controls","Acceptable Use","Acceptable Risk","False Positive","Fix Unavailable","Other"]}},"description":"Information about an Exemption","required":["type","reason","pendingChanges","issueId","status","requesterId","id","created","lastModified"]},"PendingChanges":{"type":"object","properties":{"durationDays":{"type":"integer","description":"The number of days an issue should be exempted for","format":"int64"}}},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/exemptions/issue/{issueId}":{"get":{"tags":["Exemptions"],"summary":"Get exemption for issue","description":"Get the highest-priority exemption for an issue across all scopes (account, org, project)","operationId":"Exemptions#GetExemptionForIssue","parameters":[{"name":"accountId","in":"query","description":"Harness Account ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"orgId","in":"query","description":"Harness Organization ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Organization ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"projectId","in":"query","description":"Harness Project ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Project ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"issueId","in":"path","description":"Issue ID to find exemption for","required":true,"schema":{"type":"string","description":"Issue ID to find exemption for","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"X-Api-Key","in":"header","description":"Harness personal or service access token","allowEmptyValue":true,"schema":{"type":"string","description":"Harness personal or service access token"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Exemption"}}}},"400":{"description":"BadRequest: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"401":{"description":"Unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"403":{"description":"Forbidden: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"429":{"description":"TooManyRequests: Too Many Requests response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## List exemption history for issue

> Paginated flat timeline of exemption history events for an issue

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"Exemptions","description":"Access and modify Exemptions to Security Issues"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"X-Api-Key_header_X-Api-Key":[],"jwt_header_Authorization":["sto_exemption_view"]}],"components":{"securitySchemes":{"X-Api-Key_header_X-Api-Key":{"type":"apiKey","name":"X-Api-Key","in":"header"},"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"ExemptionsListIssueExemptionHistoryResponseBody":{"$ref":"#/components/schemas/IssueExemptionHistoryResult"},"IssueExemptionHistoryResult":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/ExemptionHistoryEvent"},"description":"Flat timeline, newest first. Not grouped by exemptionId."},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["events","pagination"]},"ExemptionHistoryEvent":{"type":"object","properties":{"comment":{"type":"string","description":"eh.comment when present","maxLength":1024},"commenterEmail":{"type":"string","description":"Email of the commenter"},"commenterId":{"type":"string","description":"User ID; absent for auto-expiry","pattern":"^[a-zA-Z0-9_-]{22}$"},"commenterName":{"type":"string","description":"Display name of the commenter"},"created":{"type":"integer","description":"Unix timestamp (seconds)","format":"int64"},"durationDays":{"type":"integer","description":"COALESCE(eh.state.duration_days, pending_changes fallback)","format":"int64"},"exemptedOccurrenceCount":{"type":"integer","description":"Count of occurrences covered (issue-level fingerprint or scan-scoped)","format":"int64"},"exemptionId":{"type":"string","description":"Parent exemption.id","pattern":"^[a-zA-Z0-9_-]{22}$"},"expiration":{"type":"integer","description":"Unix timestamp from eh.state.expiration when present","format":"int64"},"id":{"type":"string","description":"exemption_history.id","pattern":"^[a-zA-Z0-9_-]{22}$"},"isAutoExpiry":{"type":"boolean","description":"True when status=Expired and commenter_id IS NULL","default":false},"isOccurrenceLevel":{"type":"boolean","description":"True when exemption has exemption_occurrence rows at event time"},"orgId":{"type":"string"},"orgName":{"type":"string","description":"Display name for orgId, resolved via ng-manager"},"pipelineId":{"type":"string","description":"From eh.state.pipeline_id when scope=PIPELINE"},"pipelineName":{"type":"string","description":"Display name for pipelineId, resolved via pipeline service"},"projectId":{"type":"string"},"projectName":{"type":"string","description":"Display name for projectId, resolved via ng-manager"},"reasonType":{"type":"string","description":"From eh.state.type (Compensating Controls, False Positive, etc.)"},"scope":{"type":"string","enum":["ACCOUNT","ORG","PROJECT","PIPELINE","TARGET"]},"status":{"type":"string","enum":["Pending","Approved","Rejected","Expired","Canceled"]},"targetId":{"type":"string","description":"From eh.state.target_id when scope=TARGET"},"targetName":{"type":"string","description":"Display name for targetId"}},"description":"Single exemption history row with per-event scope snapshot","required":["id","exemptionId","status","created","scope","isAutoExpiry"]},"Pagination":{"type":"object","properties":{"link":{"type":"string","description":"Link-based paging"},"page":{"type":"integer","description":"Page number (starting from 0)","format":"int64"},"pageSize":{"type":"integer","description":"Requested page size","format":"int64"},"totalItems":{"type":"integer","description":"Total results available","format":"int64"},"totalPages":{"type":"integer","description":"Total pages available","format":"int64"}},"required":["page","pageSize","totalPages","totalItems"]},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/exemptions/issue/{issueId}/history":{"get":{"tags":["Exemptions"],"summary":"List exemption history for issue","description":"Paginated flat timeline of exemption history events for an issue","operationId":"Exemptions#ListIssueExemptionHistory","parameters":[{"name":"accountId","in":"query","description":"Harness Account ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"orgId","in":"query","description":"Harness Organization ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Organization ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"projectId","in":"query","description":"Harness Project ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Project ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"page","in":"query","description":"Page number to fetch (starting from 0)","allowEmptyValue":true,"schema":{"type":"integer","description":"Page number to fetch (starting from 0)","default":0,"format":"int64","minimum":0}},{"name":"pageSize","in":"query","description":"Number of results per page","allowEmptyValue":true,"schema":{"type":"integer","description":"Number of results per page","default":30,"format":"int64","minimum":1,"maximum":100}},{"name":"pipelineId","in":"query","description":"Harness pipeline ID. When set with targetId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.","allowEmptyValue":true,"schema":{"type":"string","description":"Harness pipeline ID. When set with targetId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"targetId","in":"query","description":"Harness target ID. When set with pipelineId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.","allowEmptyValue":true,"schema":{"type":"string","description":"Harness target ID. When set with pipelineId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"issueId","in":"path","description":"Issue ID","required":true,"schema":{"type":"string","description":"Issue ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"X-Api-Key","in":"header","description":"Harness personal or service access token","allowEmptyValue":true,"schema":{"type":"string","description":"Harness personal or service access token"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExemptionsListIssueExemptionHistoryResponseBody"}}}},"400":{"description":"BadRequest: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"401":{"description":"Unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"403":{"description":"Forbidden: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"429":{"description":"TooManyRequests: Too Many Requests response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```

## Export exemption history for issue as CSV

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

```json
{"openapi":"3.0.3","info":{"title":"Harness Security Test Orchestration API","version":"1.0.0"},"tags":[{"name":"Exemptions","description":"Access and modify Exemptions to Security Issues"}],"servers":[{"url":"https://app.harness.io/gateway/sto"},{"url":"http://127.0.0.1:4000"}],"security":[{"X-Api-Key_header_X-Api-Key":[],"jwt_header_Authorization":["sto_exemption_view"]}],"components":{"securitySchemes":{"X-Api-Key_header_X-Api-Key":{"type":"apiKey","name":"X-Api-Key","in":"header"},"jwt_header_Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"ExportIssueExemptionHistoryResponseBody":{"type":"object","properties":{"data":{"type":"array","items":{"type":"array","items":{"type":"string"}},"description":"CSV data rows"},"filename":{"type":"string","description":"Suggested filename for download"},"headers":{"type":"array","items":{"type":"string"},"description":"CSV column headers"},"issueId":{"type":"string","description":"Issue ID for this export"},"totalRows":{"type":"integer","description":"Total number of data rows","format":"int64"}},"required":["headers","data","filename","totalRows","issueId"]},"NotFound":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"integer","default":404,"format":"int64"}},"required":["message"]}}},"paths":{"/api/v2/exemptions/issue/{issueId}/history/export":{"get":{"tags":["Exemptions"],"summary":"Export exemption history for issue as CSV","description":"CSV export of the full exemption history timeline for an issue (fetch-all, no pagination)","operationId":"Exemptions#ExportIssueExemptionHistory","parameters":[{"name":"accountId","in":"query","description":"Harness Account ID","allowEmptyValue":true,"required":true,"schema":{"type":"string","description":"Harness Account ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"orgId","in":"query","description":"Harness Organization ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Organization ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"projectId","in":"query","description":"Harness Project ID","allowEmptyValue":true,"schema":{"type":"string","description":"Harness Project ID","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"pipelineId","in":"query","description":"Harness pipeline ID. When set with targetId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.","allowEmptyValue":true,"schema":{"type":"string","description":"Harness pipeline ID. When set with targetId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","maxLength":128}},{"name":"targetId","in":"query","description":"Harness target ID. When set with pipelineId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.","allowEmptyValue":true,"schema":{"type":"string","description":"Harness target ID. When set with pipelineId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"issueId","in":"path","description":"Issue ID","required":true,"schema":{"type":"string","description":"Issue ID","pattern":"^[a-zA-Z0-9_-]{22}$"}},{"name":"X-Api-Key","in":"header","description":"Harness personal or service access token","allowEmptyValue":true,"schema":{"type":"string","description":"Harness personal or service access token"}}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportIssueExemptionHistoryResponseBody"}}}},"400":{"description":"BadRequest: Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"401":{"description":"Unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"403":{"description":"Forbidden: Forbidden response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"429":{"description":"TooManyRequests: Too Many Requests response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"InternalServerError: Internal Server Error response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}}}}}}}
```
