> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-cloud-api/aspm-cicd-and-application-security/remediations.md).

# Remediations

APIs for managing Remediation

## Get Fix Suggestion

> Retrieves a comprehensive fix suggestion for a specified application security issue. Use optional query parameters to include data such as the original code block, remediation instructions, or the suggested code fix.\
> \
> \> #### Required license:\
> \>\
> \> Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.

```json
{"openapi":"3.0.0","info":{"title":"ASPM, CICD and Application Security APIs","version":"Cortex Cloud"},"tags":[{"name":"Remediations","description":"APIs for managing Remediation"}],"servers":[{"url":"https://api-yourfqdn"}],"security":[],"paths":{"/public_api/appsec/v1/issues/fix/{issueId}/fix_suggestion":{"get":{"operationId":"GetFixSuggestion","responses":{"200":{"description":"Fix Suggestion Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIssueFixSuggestionResponse"}}}}},"description":"Retrieves a comprehensive fix suggestion for a specified application security issue. Use optional query parameters to include data such as the original code block, remediation instructions, or the suggested code fix.\n\n> #### Required license:\n>\n> Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.","tags":["Remediations"],"summary":"Get Fix Suggestion","parameters":[{"description":"The unique identifier for the specific application security issue. ","in":"path","name":"issueId","required":true,"schema":{"type":"string"}},{"description":"Specifies whether to include the original code block in the response.","in":"query","name":"showCodeBlock","required":false,"schema":{"default":true,"type":"boolean"}},{"description":"Specifies whether to include manual remediation instructions in the response.","in":"query","name":"showRemediationInstruction","required":false,"schema":{"default":false,"type":"boolean"}},{"description":"Specifies whether to include the automated code fix in the response.","in":"query","name":"showSuggestedCodeBlock","required":false,"schema":{"default":true,"type":"boolean"}}]}}},"components":{"schemas":{"GetIssueFixSuggestionResponse":{"properties":{"issueId":{"type":"string","description":"Unique identifier for the issue."},"issueName":{"type":"string","description":"Name of the security issue."},"existingCodeBlock":{"type":"string","description":"Original vulnerable code."},"remediationInstruction":{"type":"string","description":"Manual remediation instructions."},"suggestedCodeBlock":{"type":"string","description":"Automated fix suggestions."}},"required":["issueId","issueName"],"type":"object","additionalProperties":false}}}}
```

## Trigger Fix Pull Request

> Create automated pull requests to fix multiple security issues in a single bulk operation.\
> \
> \> #### Required license:\
> \>\
> \> Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.

```json
{"openapi":"3.0.0","info":{"title":"ASPM, CICD and Application Security APIs","version":"Cortex Cloud"},"tags":[{"name":"Remediations","description":"APIs for managing Remediation"}],"servers":[{"url":"https://api-yourfqdn"}],"security":[],"paths":{"/public_api/appsec/v1/issues/fix/trigger_fix_pull_request":{"post":{"operationId":"TriggerFixPr","responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerFixPrResponse"}}}}},"description":"Create automated pull requests to fix multiple security issues in a single bulk operation.\n\n> #### Required license:\n>\n> Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.","summary":"Trigger Fix Pull Request","tags":["Remediations"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerFixPrPayload"}}}}}}},"components":{"schemas":{"TriggerFixPrResponse":{"properties":{"message":{"type":"string","description":"Error message if the process fails."},"triggeredPrs":{"items":{"$ref":"#/components/schemas/TriggeredPr"},"type":"array","description":"Status of each issue."},"status":{"type":"string","description":"Overall process status."},"remediationId":{"type":"string","description":"Unique identifier to track the remediation process"},"error":{"type":"string","description":" Error details if the process fails."}},"required":["message","triggeredPrs"],"type":"object","additionalProperties":false},"TriggeredPr":{"properties":{"issueId":{"type":"string","description":"A unique identifier for issue."},"status":{"type":"string","enum":["triggered","automated_fix_not_available"],"description":"PR status. Possible values:\n -`triggered`: If the PR is in triggered state.\n -`automated_fix_not_available`: If the PR is in automated_fix_not_available state. "}},"required":["issueId","status"],"type":"object","additionalProperties":false},"TriggerFixPrPayload":{"properties":{"fixBranchName":{"type":"string","description":"The branch name for the fix pull request. If not specified, a custom branch will be used."},"title":{"type":"string","description":"The title for the fix pull request. If not specified, a default message will be used."},"issueIds":{"items":{"type":"string"},"type":"array","description":"A list of unique identifiers for the issues to be fixed. Maximum 10 IDs per request."}},"required":["issueIds"],"type":"object"}}}}
```

## Get Fix Status

> Retrieves the fix status of remediation processes using the remediation ID.\
> \
> \> #### Required license:\
> \>\
> \> Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.

```json
{"openapi":"3.0.0","info":{"title":"ASPM, CICD and Application Security APIs","version":"Cortex Cloud"},"tags":[{"name":"Remediations","description":"APIs for managing Remediation"}],"servers":[{"url":"https://api-yourfqdn"}],"security":[],"paths":{"/public_api/appsec/v1/issues/fix/{remediationId}":{"get":{"operationId":"GetFixStatus","tags":["Remediations"],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FixStatus"}}}}},"description":"Retrieves the fix status of remediation processes using the remediation ID.\n\n> #### Required license:\n>\n> Cortex Cloud Posture Management or Cortex Cloud Runtime Security with Application Security add-on.","summary":"Get Fix Status","parameters":[{"description":"Remediation Id","in":"path","name":"remediationId","required":true,"schema":{"type":"string"}}]}}},"components":{"schemas":{"FixStatus":{"properties":{"isProcessDone":{"type":"boolean","description":"Indicates whether all remediation processes are complete."},"results":{"items":{"$ref":"#/components/schemas/SaveFixResult"},"type":"array","description":" Remediation results grouped by repository."}},"required":["isProcessDone","results"],"type":"object"},"SaveFixResult":{"properties":{"prUrl":{"type":"string","description":"URL of the created pull request."},"errorMessage":{"type":"string","description":"Error details if the process failed."},"remediationRepositoryId":{"type":"string","description":" Internal repository identifier."},"failureIssueIds":{"items":{"type":"string","description":"Issues Ids that could not be fixed."},"type":"array"},"successfulIssueIds":{"items":{"type":"string","description":"Issues Ids that were successfully fixed."},"type":"array"}},"required":["remediationRepositoryId","failureIssueIds","successfulIssueIds"],"type":"object"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-cloud-api/aspm-cicd-and-application-security/remediations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
