> 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-filters.md).

# getIncidentRemediationFilters

Returns the per-option counts for the Remediation filter bar: issue, application, appTag, businessUnit and fixType. Each facet counts rows with the search and every other filter applied and its own field excluded. The section, itemLimit, cursor, sortBy and sortOrder of the input are ignored. The counts are unavailable and the request is refused while any section has more than 20,000 rows.

### Examples

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

```graphql
query GetIncidentRemediationFilters($incidentId: String!, $input: GetIncidentRemediationPageInput) {
  getIncidentRemediationFilters(incidentId: $incidentId, input: $input) {
    warnings
    type
    items {
      value
      count
      label
    }
    isTruncated
  }
}
```

#### Variables

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

```json
{
  "incidentId": "example",
  "input": {
    "section": "PullRequest",
    "itemLimit": 42,
    "cursor": "example",
    "search": "example",
    "conditionalFilters": [
      {
        "fieldName": "example",
        "values": ["example"],
        "condition": "OR"
      }
    ],
    "sortBy": "Title",
    "sortOrder": "asc"
  }
}
```

{% 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 GetIncidentRemediationFilters($incidentId: String!, $input: GetIncidentRemediationPageInput) { getIncidentRemediationFilters(incidentId: $incidentId, input: $input) { warnings type items { value count label } isTruncated } }",
 "variables": {
    "incidentId": "example",
    "input": {
      "section": "PullRequest",
      "itemLimit": 42,
      "cursor": "example",
      "search": "example",
      "conditionalFilters": [
        {
          "fieldName": "example",
          "values": ["example"],
          "condition": "OR"
        }
      ],
      "sortBy": "Title",
      "sortOrder": "asc"
    }
  }
}'
```

{% endtab %}

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

```javascript
const query = 'query GetIncidentRemediationFilters($incidentId: String!, $input: GetIncidentRemediationPageInput) { getIncidentRemediationFilters(incidentId: $incidentId, input: $input) { warnings type items { value count label } isTruncated } }';

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",
      input: {
        section: "PullRequest",
        itemLimit: 42,
        cursor: "example",
        search: "example",
        conditionalFilters: [
          {
            fieldName: "example",
            values: ["example"],
            condition: "OR"
          }
        ],
        sortBy: "Title",
        sortOrder: "asc"
      }
    }
  })
})
.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 GetIncidentRemediationFilters($incidentId: String!, $input: GetIncidentRemediationPageInput) { getIncidentRemediationFilters(incidentId: $incidentId, input: $input) { warnings type items { value count label } isTruncated } }'

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",
      "input": {
        "section": "PullRequest",
        "itemLimit": 42,
        "cursor": "example",
        "search": "example",
        "conditionalFilters": [
          {
            "fieldName": "example",
            "values": ["example"],
            "condition": "OR"
          }
        ],
        "sortBy": "Title",
        "sortOrder": "asc"
      }
    }
  }
)

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 `getIncidentRemediationFilters` query.

| Argument                                                                                                                                                                     | Description                                                                                                                | Supported fields                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| incidentId `String!` <mark style="color:red;background-color:red;">required</mark>                                                                                           |                                                                                                                            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| input [`GetIncidentRemediationPageInput`](https://docs.ox.security/api-documentation/api-reference/api--response-center/types/inputs/get-incident-remediation-page-input.md) | The input carries the search and filters that the counts are computed under. When omitted, no search and no filters apply. | <p>section <a href="https://docs.ox.security/api-documentation/api-reference/api--response-center/types/enums/remediation-section.md"><code>RemediationSection</code></a><br>itemLimit <code>Int</code><br>cursor <code>String</code><br>search <code>String</code><br>conditionalFilters <a href="https://docs.ox.security/api-documentation/api-reference/api--response-center/types/inputs/incident-conditional-filter-input.md"><code>\[IncidentConditionalFilterInput!]</code></a><br>sortBy <a href="https://docs.ox.security/api-documentation/api-reference/api--response-center/types/enums/remediation-sort-field.md"><code>RemediationSortField</code></a><br>sortOrder <a href="https://docs.ox.security/api-documentation/api-reference/api--response-center/types/enums/sort-order.md"><code>SortOrder</code></a></p> |

### Fields

Return type: [`[IncidentEvidenceFilterGroup!]!`](https://docs.ox.security/api-documentation/api-reference/api--response-center/types/objects/incident-evidence-filter-group.md)

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

| Field                                                                                                                                                 | Description                                                                                                                                                                                                                                            | Supported fields                                                                          |
| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
| warnings `[String!]`                                                                                                                                  | Explains which optional search sources are unavailable and can make these counts incomplete.                                                                                                                                                           |                                                                                           |
| type `String!`                                                                                                                                        | The name of the filter field the options belong to.                                                                                                                                                                                                    |                                                                                           |
| items [`[IncidentFilterItem!]!`](https://docs.ox.security/api-documentation/api-reference/api--response-center/types/objects/incident-filter-item.md) | The options of the filter field with their counts.                                                                                                                                                                                                     | <p>value <code>String!</code><br>count <code>Int!</code><br>label <code>String</code></p> |
| isTruncated `Boolean`                                                                                                                                 | This flag is set on an affected-resources facet group when its counts include cloud accounts and only a limited number of those accounts were evaluated, so the cloud account share of the counts is partial. It is absent on every other facet group. |                                                                                           |


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ox.security/api-documentation/api-reference/api--response-center/queries/get-incident-remediation-filters.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
