> For the complete documentation index, see [llms.txt](https://docs.ox.security/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ox.security/api-documentation/api-reference/api--response-center/queries/get-incident-remediation.md).

# getIncidentRemediation

Remediation rollup for one incident: PRs, tickets, fixability and the by-resource view.

### Examples

{% tabs %}
{% tab title="GraphQL" %}

```graphql
query GetIncidentRemediation($incidentId: String!) {
  getIncidentRemediation(incidentId: $incidentId) {
    summary {
      pullRequests {
        total
        merged
        open
        draft
      }
      tickets {
        total
        done
        inProgress
        blocked
      }
      fixability {
        fixableIndicators
        totalIndicators
        downgradeOnly
      }
      deployGap
    }
    pullRequests {
      id
      incidentId
      itemType
      externalId
      title
      provider
      project
      author
      assignee
      team
      upgradeType
      ciStatus
      reviewStatus
      state
      resourceName
      issueId
      linkedIndicatorValues
      url
      isDeployed
      eventAt
    }
    tickets {
      id
      incidentId
      itemType
      externalId
      title
      provider
      project
      author
      assignee
      team
      upgradeType
      ciStatus
      reviewStatus
      state
      resourceName
      issueId
      linkedIndicatorValues
      url
      isDeployed
      eventAt
    }
    byResource {
      resourceName
      pullRequest {
        id
        incidentId
        itemType
        externalId
        title
        provider
        project
        author
        assignee
        team
        upgradeType
        ciStatus
        reviewStatus
        state
        resourceName
        issueId
        linkedIndicatorValues
        url
        isDeployed
        eventAt
      }
      ticket {
        id
        incidentId
        itemType
        externalId
        title
        provider
        project
        author
        assignee
        team
        upgradeType
        ciStatus
        reviewStatus
        state
        resourceName
        issueId
        linkedIndicatorValues
        url
        isDeployed
        eventAt
      }
      netStatus
      updatedAt
    }
    availableFixes {
      issueId
      title
      severity
      category
      resourceName
      appName
      fixType
      hitIndicatorValues
    }
  }
}
```

#### Variables

This is an example input showing all available input fields. Only fields marked as required in the schema are mandatory.

```json
{
  "incidentId": "example"
}
```

{% endtab %}

{% tab title="cURL" %}

```shell
curl -X POST \
https://api.cloud.ox.security/api/apollo-gateway \
-H 'Content-Type: application/json' \
-H 'Authorization: YOUR_API_TOKEN' \
-d '{
 "query": "query GetIncidentRemediation($incidentId: String!) { getIncidentRemediation(incidentId: $incidentId) { summary { pullRequests { total merged open draft } tickets { total done inProgress blocked } fixability { fixableIndicators totalIndicators downgradeOnly } deployGap } pullRequests { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } tickets { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } byResource { resourceName pullRequest { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } ticket { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } netStatus updatedAt } availableFixes { issueId title severity category resourceName appName fixType hitIndicatorValues } } }",
 "variables": {
    "incidentId": "example"
  }
}'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const query = 'query GetIncidentRemediation($incidentId: String!) { getIncidentRemediation(incidentId: $incidentId) { summary { pullRequests { total merged open draft } tickets { total done inProgress blocked } fixability { fixableIndicators totalIndicators downgradeOnly } deployGap } pullRequests { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } tickets { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } byResource { resourceName pullRequest { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } ticket { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } netStatus updatedAt } availableFixes { issueId title severity category resourceName appName fixType hitIndicatorValues } } }';

fetch("https://api.cloud.ox.security/api/apollo-gateway", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "YOUR_API_TOKEN"
  },
  body: JSON.stringify({
    query: query,
    // This is an example input showing all available input fields. Only fields marked as required in the schema are mandatory.
    variables: {
      incidentId: "example"
    }
  })
})
.then(response => response.json())
.then(result => console.log(JSON.stringify(result, null, 2)))
.catch(error => console.error('Error:', error));
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

query = 'query GetIncidentRemediation($incidentId: String!) { getIncidentRemediation(incidentId: $incidentId) { summary { pullRequests { total merged open draft } tickets { total done inProgress blocked } fixability { fixableIndicators totalIndicators downgradeOnly } deployGap } pullRequests { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } tickets { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } byResource { resourceName pullRequest { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } ticket { id incidentId itemType externalId title provider project author assignee team upgradeType ciStatus reviewStatus state resourceName issueId linkedIndicatorValues url isDeployed eventAt } netStatus updatedAt } availableFixes { issueId title severity category resourceName appName fixType hitIndicatorValues } } }'

response = requests.post(
  "https://api.cloud.ox.security/api/apollo-gateway",
  headers={
    "Content-Type": "application/json",
    "Authorization": "YOUR_API_TOKEN"
  },
  json={
    "query": query,
    # This is an example input showing all available input fields. Only fields marked as required in the schema are mandatory.
    "variables": {
      "incidentId": "example"
    }
  }
)

if response.status_code == 200:
    result = response.json()
    print(result)
else:
    print(f"Error: {response.status_code}")
    print(response.text)
```

{% endtab %}
{% endtabs %}

### Arguments

You can use the following argument(s) to customize your `getIncidentRemediation` query.

| Argument                                                                           | Description | Supported fields |
| ---------------------------------------------------------------------------------- | ----------- | ---------------- |
| incidentId `String!` <mark style="color:red;background-color:red;">required</mark> |             |                  |

### Fields

Return type: [`IncidentRemediation!`](/api-documentation/api-reference/api--response-center/types/objects/incident-remediation.md)

You can use the following field(s) to specify what information your `getIncidentRemediation` query will return. Please note that some fields may have their own subfields.

| Field                                                                                                                                            | Description | Supported fields                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| summary [`RemediationSummary!`](/api-documentation/api-reference/api--response-center/types/objects/remediation-summary.md)                      |             | <p>pullRequests <a href="/pages/fWUNt2MSDsUrsz0VQgwS"><code>RemediationPrSummary!</code></a><br>tickets <a href="/pages/c6KEBIVU5UD1BNt6Y2Sy"><code>RemediationTicketSummary!</code></a><br>fixability <a href="/pages/DlKdoohU76HuseTyz8iY"><code>RemediationFixability!</code></a><br>deployGap <code>Int!</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| pullRequests [`[IncidentRemediationItem!]!`](/api-documentation/api-reference/api--response-center/types/objects/incident-remediation-item.md)   |             | <p>id <code>String!</code><br>incidentId <code>String!</code><br>itemType <a href="/pages/STjlUjYSkBd1D9RRGSwM"><code>RemediationItemType!</code></a><br>externalId <code>String!</code><br>title <code>String!</code><br>provider <code>String!</code><br>project <code>String</code><br>author <code>String</code><br>assignee <code>String</code><br>team <code>String</code><br>upgradeType <a href="/pages/vSe4jzQ6ZO5RmeUqrrKV"><code>RemediationUpgradeType</code></a><br>ciStatus <a href="/pages/G6j9z3pWRfY0SHzhrpPZ"><code>RemediationCiStatus</code></a><br>reviewStatus <a href="/pages/dM0iw3UXMbBhewoAlmdL"><code>RemediationReviewStatus</code></a><br>state <a href="/pages/cTQMFbmPZd1LDwDC37Pe"><code>RemediationState!</code></a><br>resourceName <code>String</code><br>issueId <code>String</code><br>linkedIndicatorValues <code>\[String!]!</code><br>url <code>String</code><br>isDeployed <code>Boolean</code><br>eventAt <code>DateTime!</code></p> |
| tickets [`[IncidentRemediationItem!]!`](/api-documentation/api-reference/api--response-center/types/objects/incident-remediation-item.md)        |             | <p>id <code>String!</code><br>incidentId <code>String!</code><br>itemType <a href="/pages/STjlUjYSkBd1D9RRGSwM"><code>RemediationItemType!</code></a><br>externalId <code>String!</code><br>title <code>String!</code><br>provider <code>String!</code><br>project <code>String</code><br>author <code>String</code><br>assignee <code>String</code><br>team <code>String</code><br>upgradeType <a href="/pages/vSe4jzQ6ZO5RmeUqrrKV"><code>RemediationUpgradeType</code></a><br>ciStatus <a href="/pages/G6j9z3pWRfY0SHzhrpPZ"><code>RemediationCiStatus</code></a><br>reviewStatus <a href="/pages/dM0iw3UXMbBhewoAlmdL"><code>RemediationReviewStatus</code></a><br>state <a href="/pages/cTQMFbmPZd1LDwDC37Pe"><code>RemediationState!</code></a><br>resourceName <code>String</code><br>issueId <code>String</code><br>linkedIndicatorValues <code>\[String!]!</code><br>url <code>String</code><br>isDeployed <code>Boolean</code><br>eventAt <code>DateTime!</code></p> |
| byResource [`[RemediationByResource!]!`](/api-documentation/api-reference/api--response-center/types/objects/remediation-by-resource.md)         |             | <p>resourceName <code>String!</code><br>pullRequest <a href="/pages/29N5kLfTHx86jEHryrd2"><code>IncidentRemediationItem</code></a><br>ticket <a href="/pages/29N5kLfTHx86jEHryrd2"><code>IncidentRemediationItem</code></a><br>netStatus <a href="/pages/kmJpMq7ucHsATfLtSMCG"><code>AffectedResourceStatus!</code></a><br>updatedAt <code>DateTime</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| availableFixes [`[RemediationAvailableFix!]!`](/api-documentation/api-reference/api--response-center/types/objects/remediation-available-fix.md) |             | <p>issueId <code>String!</code><br>title <code>String!</code><br>severity <code>String</code><br>category <code>String</code><br>resourceName <code>String</code><br>appName <code>String</code><br>fixType <code>String</code><br>hitIndicatorValues <code>\[String!]!</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |


---

# 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://docs.ox.security/api-documentation/api-reference/api--response-center/queries/get-incident-remediation.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.
