> 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--sbom/queries/get-sbom-conditional-filters.md).

# getSbomConditionalFilters

Retrieves conditional filters for SBOM libraries with lazy loading support.

### Examples

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

```graphql
query GetSbomConditionalFilters($input: GetSbomConditionalFiltersInput) {
  getSbomConditionalFilters(input: $input) {
    total
    totalFiltered
    filters {
      type
      items {
        id
        filterId
        label
        count
        percent
        changeNumber
        policyId
        extraInfo {
          key
          value
        }
      }
    }
  }
}
```

#### Variables

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

```json
{
  "input": {
    "scanId": "c9da693d-8906-4a32-93c9-2ffdb1cebb99",
    "conditionalFilters": [
      {
        "condition": "AND",
        "fieldName": "digest",
        "values": ["example"],
        "greaterThan": 13.37,
        "lessThan": 13.37
      }
    ],
    "search": "example",
    "owners": ["example"],
    "openItems": ["digest"],
    "tagIds": ["example"],
    "sbomSearch": [
      {
        "fieldName": "example",
        "value": ["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 GetSbomConditionalFilters($input: GetSbomConditionalFiltersInput) { getSbomConditionalFilters(input: $input) { total totalFiltered filters { type items { id filterId label count percent changeNumber policyId extraInfo { key value } } } } }",
 "variables": {
    "input": {
      "scanId": "c9da693d-8906-4a32-93c9-2ffdb1cebb99",
      "conditionalFilters": [
        {
          "condition": "AND",
          "fieldName": "digest",
          "values": ["example"],
          "greaterThan": 13.37,
          "lessThan": 13.37
        }
      ],
      "search": "example",
      "owners": ["example"],
      "openItems": ["digest"],
      "tagIds": ["example"],
      "sbomSearch": [
        {
          "fieldName": "example",
          "value": ["example"]
        }
      ]
    }
  }
}'
```

{% endtab %}

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

```javascript
const query = 'query GetSbomConditionalFilters($input: GetSbomConditionalFiltersInput) { getSbomConditionalFilters(input: $input) { total totalFiltered filters { type items { id filterId label count percent changeNumber policyId extraInfo { key value } } } } }';

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: {
      input: {
        scanId: "c9da693d-8906-4a32-93c9-2ffdb1cebb99",
        conditionalFilters: [
          {
            condition: "AND",
            fieldName: "digest",
            values: ["example"],
            greaterThan: 13.37,
            lessThan: 13.37
          }
        ],
        search: "example",
        owners: ["example"],
        openItems: ["digest"],
        tagIds: ["example"],
        sbomSearch: [
          {
            fieldName: "example",
            value: ["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 GetSbomConditionalFilters($input: GetSbomConditionalFiltersInput) { getSbomConditionalFilters(input: $input) { total totalFiltered filters { type items { id filterId label count percent changeNumber policyId extraInfo { key value } } } } }'

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": {
      "input": {
        "scanId": "c9da693d-8906-4a32-93c9-2ffdb1cebb99",
        "conditionalFilters": [
          {
            "condition": "AND",
            "fieldName": "digest",
            "values": ["example"],
            "greaterThan": 13.37,
            "lessThan": 13.37
          }
        ],
        "search": "example",
        "owners": ["example"],
        "openItems": ["digest"],
        "tagIds": ["example"],
        "sbomSearch": [
          {
            "fieldName": "example",
            "value": ["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 `getSbomConditionalFilters` query.

| Argument                                                                                                                                | Description                                                          | Supported fields                                                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| input [`GetSbomConditionalFiltersInput`](/api-documentation/api-reference/api--sbom/types/inputs/get-sbom-conditional-filters-input.md) | Parameters for filtering and paginating the SBOM conditional filters | <p>scanId <code>String</code><br>conditionalFilters <a href="/pages/yu4aziJRLZg2CcFaodVJ"><code>\[ConditionalFilters]</code></a><br>search <code>String</code><br>owners <code>\[String]</code><br>openItems <a href="/pages/43jgm6P5kcKgBM8FmTho"><code>\[FilterTypes]</code></a><br>tagIds <code>\[String]</code><br>sbomSearch <a href="/pages/501RBby5Vj4iETTOR8n2"><code>\[AutoCompleteSearch]</code></a></p> |

### Fields

Return type: [`FilterLazyResponse`](/api-documentation/api-reference/api--application/types/objects/filter-lazy-response.md)

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

| Field                                                                                                    | Description                                  | Supported fields                                                                                                                                             |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| total `Int`                                                                                              | Total number of items available              |                                                                                                                                                              |
| totalFiltered `Int`                                                                                      | Total number of items after applying filters |                                                                                                                                                              |
| filters [`[FilterLazy]`](/api-documentation/api-reference/api--application/types/objects/filter-lazy.md) | List of filter categories with their items   | <p>type <a href="/pages/43jgm6P5kcKgBM8FmTho"><code>FilterTypes</code></a><br>items <a href="/pages/e9bClSOnFIyNZti4AxLH"><code>\[FilterInfo]</code></a></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:

```
GET https://docs.ox.security/api-documentation/api-reference/api--sbom/queries/get-sbom-conditional-filters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
