---
title: Override the severity of security findings
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Security Monitoring
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Override the severity of security findings{% #override-the-severity-of-security-findings %}

{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                          |
| ----------------- | --------------------------------------------------------------------- |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/security/findings/severity |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/security/findings/severity |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/security/findings/severity      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/security/findings/severity      |
| us2.ddog-gov.com  | PATCH https://api.us2.ddog-gov.com/api/v2/security/findings/severity  |
| uk1.datadoghq.com | PATCH https://api.uk1.datadoghq.com/api/v2/security/findings/severity |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/security/findings/severity     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/security/findings/severity |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/security/findings/severity |

### Overview



Set or clear the manual severity override of security findings.

You can update up to 100 security findings per request. Use the `set` action with a `value` to apply a manual severity override. `value` is required for `set` and must be omitted for `clear`. The `info` value sets the lowest severity the finding type allows. Use the `clear` action to remove a manual severity override. `clear` does not remove a severity set by an automation rule. The optional `description` is accepted with both actions and has a limit of 280 characters.

Auto-closed findings are excluded. Findings whose severity was set by an automation rule are skipped and listed in the response `meta.warnings`. If every finding is skipped this way, the request fails with a `400` error. Findings that cannot be found are skipped without a warning. The request fails with a `404` error only if none of the findings can be found.
This endpoint requires any of the following permissions:`security_monitoring_findings_write``appsec_vm_write``data_scanner_write` 


### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field   | Field                           | Type          | Description                                                                                                                                                                                 |
| -------------- | ------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                | data [*required*]          | object        | Data of the severity override request.                                                                                                                                                      |
| data           | attributes [*required*]    | object        | Attributes of the severity override request.                                                                                                                                                |
| attributes     | severity [*required*]      |  <oneOf> | Severity override to apply to the findings. Set `action` to `set` to apply a manual severity override with the given `value`. Set `action` to `clear` to remove a manual severity override. |
| severity       | <action=set>                    | object        | Applies a manual severity override to the findings.                                                                                                                                         |
| <action=set>   | action [*required*]        | enum          | The action that applies a manual severity override. Allowed enum values: `set`                                                                                                              |
| <action=set>   | description                     | string        | Additional information about the severity change. This field has a limit of 280 characters.                                                                                                 |
| <action=set>   | value [*required*]         | enum          | Severity to apply to the findings. `info` sets the lowest severity the finding type allows. Allowed enum values: `critical,high,medium,low,info`                                            |
| severity       | <action=clear>                  | object        | Removes the manual severity override of the findings. This action does not remove a severity set by an automation rule.                                                                     |
| <action=clear> | action [*required*]        | enum          | The action that removes a manual severity override. Allowed enum values: `clear`                                                                                                            |
| <action=clear> | description                     | string        | Additional information about the severity change. This field has a limit of 280 characters.                                                                                                 |
| data           | id                              | string        | Unique identifier of the severity override request. If not provided, an identifier is generated.                                                                                            |
| data           | relationships [*required*] | object        | Relationships of the severity override request.                                                                                                                                             |
| relationships  | findings [*required*]      | object        | Security findings to override the severity of.                                                                                                                                              |
| findings       | data                            | [object]      | Array of security finding data objects.                                                                                                                                                     |
| data           | id [*required*]            | string        | Unique identifier of the security finding.                                                                                                                                                  |
| data           | type [*required*]          | enum          | Security findings resource type. Allowed enum values: `findings`                                                                                                                            |
| data           | type [*required*]          | enum          | Severity override resource type. Allowed enum values: `severity_override`                                                                                                                   |

{% /tab %}

{% tab title="Example" %}
##### 

```json
{
  "data": {
    "attributes": {
      "severity": {
        "action": "set",
        "description": "Database contains sensitive data.",
        "value": "high"
      }
    },
    "relationships": {
      "findings": {
        "data": [
          {
            "id": "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=",
            "type": "findings"
          }
        ]
      }
    },
    "type": "severity_override"
  }
}
```

##### 

```json
{
  "data": {
    "attributes": {
      "severity": {
        "action": "clear"
      }
    },
    "relationships": {
      "findings": {
        "data": [
          {
            "id": "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=",
            "type": "findings"
          }
        ]
      }
    },
    "type": "severity_override"
  }
}
```

{% /tab %}

### Response

{% tab title="202" %}
Accepted
{% tab title="Model" %}
Response for the severity override request.

| Parent field | Field                        | Type     | Description                                                               |
| ------------ | ---------------------------- | -------- | ------------------------------------------------------------------------- |
|              | data [*required*]       | object   | Data of the severity override response.                                   |
| data         | id [*required*]         | string   | Unique identifier of the severity override request.                       |
| data         | type [*required*]       | enum     | Severity override resource type. Allowed enum values: `severity_override` |
|              | meta                         | object   | Security findings skipped while processing the severity override request. |
| meta         | warnings                     | [object] | Findings skipped because an automation rule set their severity.           |
| warnings     | detail [*required*]     | string   | Human-readable explanation of why the finding was skipped.                |
| warnings     | finding_id [*required*] | string   | Unique identifier of the security finding.                                |
| warnings     | status [*required*]     | int32    | HTTP-like status code describing the outcome for this finding.            |
| warnings     | title [*required*]      | string   | Short label describing the outcome for this finding.                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000001",
    "type": "severity_override"
  },
  "meta": {
    "warnings": [
      {
        "detail": "cannot set severity on finding because it is overridden by an automation severity modifier rule; disable or update the automation rule first",
        "finding_id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==",
        "status": 400,
        "title": "Bad Request"
      }
    ]
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="422" %}
Unprocessable Entity
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                          \## default
# 
 \# Use a Personal Access Token or Service Access Token export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"  \# Curl command curl -X PATCH "https://api.datadoghq.com/api/v2/security/findings/severity" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "severity": {
        "action": "set",
        "description": "Database contains sensitive data.",
        "value": "high"
      }
    },
    "relationships": {
      "findings": {
        "data": [
          {
            "id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==",
            "type": "findings"
          },
          {
            "id": "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=",
            "type": "findings"
          }
        ]
      }
    },
    "type": "severity_override"
  }
}
EOF 
                        
##### 
                          \## default
# 
 \# Use a Personal Access Token or Service Access Token export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"  \# Curl command curl -X PATCH "https://api.datadoghq.com/api/v2/security/findings/severity" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "severity": {
        "action": "set",
        "description": "Database contains sensitive data.",
        "value": "high"
      }
    },
    "relationships": {
      "findings": {
        "data": [
          {
            "id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==",
            "type": "findings"
          },
          {
            "id": "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=",
            "type": "findings"
          }
        ]
      }
    },
    "type": "severity_override"
  }
}
EOF 
                        
##### 

```go
// Apply a severity override to security findings returns "Accepted" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.SeverityOverrideRequest{
		Data: datadogV2.SeverityOverrideRequestData{
			Attributes: datadogV2.SeverityOverrideRequestDataAttributes{
				Severity: datadogV2.SeverityOverrideAttributes{
					SeverityOverrideSet: &datadogV2.SeverityOverrideSet{
						Action:      datadogV2.SEVERITYOVERRIDESETACTIONTYPE_SET,
						Description: datadog.PtrString("Database contains sensitive data."),
						Value:       datadogV2.SEVERITYOVERRIDEVALUE_HIGH,
					}},
			},
			Relationships: datadogV2.SeverityOverrideRequestDataRelationships{
				Findings: datadogV2.Findings{
					Data: []datadogV2.FindingData{
						{
							Id:   "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=",
							Type: datadogV2.FINDINGDATATYPE_FINDINGS,
						},
					},
				},
			},
			Type: datadogV2.SEVERITYOVERRIDEDATATYPE_SEVERITY_OVERRIDE,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
	configuration := datadog.NewConfiguration()
	configuration.SetUnstableOperationEnabled("v2.UpdateFindingsSeverity", true)
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSecurityMonitoringApi(apiClient)
	resp, r, err := api.UpdateFindingsSeverity(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SecurityMonitoringApi.UpdateFindingsSeverity`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SecurityMonitoringApi.UpdateFindingsSeverity`:\n%s\n", responseContent)
}
```

##### 

```go
// Clear the severity override of security findings returns "Accepted" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	body := datadogV2.SeverityOverrideRequest{
		Data: datadogV2.SeverityOverrideRequestData{
			Attributes: datadogV2.SeverityOverrideRequestDataAttributes{
				Severity: datadogV2.SeverityOverrideAttributes{
					SeverityOverrideClear: &datadogV2.SeverityOverrideClear{
						Action: datadogV2.SEVERITYOVERRIDECLEARACTIONTYPE_CLEAR,
					}},
			},
			Relationships: datadogV2.SeverityOverrideRequestDataRelationships{
				Findings: datadogV2.Findings{
					Data: []datadogV2.FindingData{
						{
							Id:   "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=",
							Type: datadogV2.FINDINGDATATYPE_FINDINGS,
						},
					},
				},
			},
			Type: datadogV2.SEVERITYOVERRIDEDATATYPE_SEVERITY_OVERRIDE,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
	configuration := datadog.NewConfiguration()
	configuration.SetUnstableOperationEnabled("v2.UpdateFindingsSeverity", true)
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewSecurityMonitoringApi(apiClient)
	resp, r, err := api.UpdateFindingsSeverity(ctx, body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SecurityMonitoringApi.UpdateFindingsSeverity`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `SecurityMonitoringApi.UpdateFindingsSeverity`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"
##### 

```java
// Apply a severity override to security findings returns "Accepted" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SecurityMonitoringApi;
import com.datadog.api.client.v2.model.FindingData;
import com.datadog.api.client.v2.model.FindingDataType;
import com.datadog.api.client.v2.model.Findings;
import com.datadog.api.client.v2.model.SeverityOverrideAttributes;
import com.datadog.api.client.v2.model.SeverityOverrideDataType;
import com.datadog.api.client.v2.model.SeverityOverrideRequest;
import com.datadog.api.client.v2.model.SeverityOverrideRequestData;
import com.datadog.api.client.v2.model.SeverityOverrideRequestDataAttributes;
import com.datadog.api.client.v2.model.SeverityOverrideRequestDataRelationships;
import com.datadog.api.client.v2.model.SeverityOverrideResponse;
import com.datadog.api.client.v2.model.SeverityOverrideSet;
import com.datadog.api.client.v2.model.SeverityOverrideSetActionType;
import com.datadog.api.client.v2.model.SeverityOverrideValue;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
    defaultClient.setUnstableOperationEnabled("v2.updateFindingsSeverity", true);
    SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

    SeverityOverrideRequest body =
        new SeverityOverrideRequest()
            .data(
                new SeverityOverrideRequestData()
                    .attributes(
                        new SeverityOverrideRequestDataAttributes()
                            .severity(
                                new SeverityOverrideAttributes(
                                    new SeverityOverrideSet()
                                        .action(SeverityOverrideSetActionType.SET)
                                        .description("Database contains sensitive data.")
                                        .value(SeverityOverrideValue.HIGH))))
                    .relationships(
                        new SeverityOverrideRequestDataRelationships()
                            .findings(
                                new Findings()
                                    .data(
                                        Collections.singletonList(
                                            new FindingData()
                                                .id(
                                                    "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=")
                                                .type(FindingDataType.FINDINGS)))))
                    .type(SeverityOverrideDataType.SEVERITY_OVERRIDE));

    try {
      SeverityOverrideResponse result = apiInstance.updateFindingsSeverity(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SecurityMonitoringApi#updateFindingsSeverity");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

##### 

```java
// Clear the severity override of security findings returns "Accepted" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SecurityMonitoringApi;
import com.datadog.api.client.v2.model.FindingData;
import com.datadog.api.client.v2.model.FindingDataType;
import com.datadog.api.client.v2.model.Findings;
import com.datadog.api.client.v2.model.SeverityOverrideAttributes;
import com.datadog.api.client.v2.model.SeverityOverrideClear;
import com.datadog.api.client.v2.model.SeverityOverrideClearActionType;
import com.datadog.api.client.v2.model.SeverityOverrideDataType;
import com.datadog.api.client.v2.model.SeverityOverrideRequest;
import com.datadog.api.client.v2.model.SeverityOverrideRequestData;
import com.datadog.api.client.v2.model.SeverityOverrideRequestDataAttributes;
import com.datadog.api.client.v2.model.SeverityOverrideRequestDataRelationships;
import com.datadog.api.client.v2.model.SeverityOverrideResponse;
import java.util.Collections;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
    defaultClient.setUnstableOperationEnabled("v2.updateFindingsSeverity", true);
    SecurityMonitoringApi apiInstance = new SecurityMonitoringApi(defaultClient);

    SeverityOverrideRequest body =
        new SeverityOverrideRequest()
            .data(
                new SeverityOverrideRequestData()
                    .attributes(
                        new SeverityOverrideRequestDataAttributes()
                            .severity(
                                new SeverityOverrideAttributes(
                                    new SeverityOverrideClear()
                                        .action(SeverityOverrideClearActionType.CLEAR))))
                    .relationships(
                        new SeverityOverrideRequestDataRelationships()
                            .findings(
                                new Findings()
                                    .data(
                                        Collections.singletonList(
                                            new FindingData()
                                                .id(
                                                    "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=")
                                                .type(FindingDataType.FINDINGS)))))
                    .type(SeverityOverrideDataType.SEVERITY_OVERRIDE));

    try {
      SeverityOverrideResponse result = apiInstance.updateFindingsSeverity(body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SecurityMonitoringApi#updateFindingsSeverity");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"
##### 

```python
"""
Apply a severity override to security findings returns "Accepted" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
from datadog_api_client.v2.model.finding_data import FindingData
from datadog_api_client.v2.model.finding_data_type import FindingDataType
from datadog_api_client.v2.model.findings import Findings
from datadog_api_client.v2.model.severity_override_data_type import SeverityOverrideDataType
from datadog_api_client.v2.model.severity_override_request import SeverityOverrideRequest
from datadog_api_client.v2.model.severity_override_request_data import SeverityOverrideRequestData
from datadog_api_client.v2.model.severity_override_request_data_attributes import SeverityOverrideRequestDataAttributes
from datadog_api_client.v2.model.severity_override_request_data_relationships import (
    SeverityOverrideRequestDataRelationships,
)
from datadog_api_client.v2.model.severity_override_set import SeverityOverrideSet
from datadog_api_client.v2.model.severity_override_set_action_type import SeverityOverrideSetActionType
from datadog_api_client.v2.model.severity_override_value import SeverityOverrideValue

body = SeverityOverrideRequest(
    data=SeverityOverrideRequestData(
        attributes=SeverityOverrideRequestDataAttributes(
            severity=SeverityOverrideSet(
                action=SeverityOverrideSetActionType.SET,
                description="Database contains sensitive data.",
                value=SeverityOverrideValue.HIGH,
            ),
        ),
        relationships=SeverityOverrideRequestDataRelationships(
            findings=Findings(
                data=[
                    FindingData(
                        id="ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=",
                        type=FindingDataType.FINDINGS,
                    ),
                ],
            ),
        ),
        type=SeverityOverrideDataType.SEVERITY_OVERRIDE,
    ),
)

configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
configuration.unstable_operations["update_findings_severity"] = True
with ApiClient(configuration) as api_client:
    api_instance = SecurityMonitoringApi(api_client)
    response = api_instance.update_findings_severity(body=body)

    print(response)
```

##### 

```python
"""
Clear the severity override of security findings returns "Accepted" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
from datadog_api_client.v2.model.finding_data import FindingData
from datadog_api_client.v2.model.finding_data_type import FindingDataType
from datadog_api_client.v2.model.findings import Findings
from datadog_api_client.v2.model.severity_override_clear import SeverityOverrideClear
from datadog_api_client.v2.model.severity_override_clear_action_type import SeverityOverrideClearActionType
from datadog_api_client.v2.model.severity_override_data_type import SeverityOverrideDataType
from datadog_api_client.v2.model.severity_override_request import SeverityOverrideRequest
from datadog_api_client.v2.model.severity_override_request_data import SeverityOverrideRequestData
from datadog_api_client.v2.model.severity_override_request_data_attributes import SeverityOverrideRequestDataAttributes
from datadog_api_client.v2.model.severity_override_request_data_relationships import (
    SeverityOverrideRequestDataRelationships,
)

body = SeverityOverrideRequest(
    data=SeverityOverrideRequestData(
        attributes=SeverityOverrideRequestDataAttributes(
            severity=SeverityOverrideClear(
                action=SeverityOverrideClearActionType.CLEAR,
            ),
        ),
        relationships=SeverityOverrideRequestDataRelationships(
            findings=Findings(
                data=[
                    FindingData(
                        id="ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=",
                        type=FindingDataType.FINDINGS,
                    ),
                ],
            ),
        ),
        type=SeverityOverrideDataType.SEVERITY_OVERRIDE,
    ),
)

configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
configuration.unstable_operations["update_findings_severity"] = True
with ApiClient(configuration) as api_client:
    api_instance = SecurityMonitoringApi(api_client)
    response = api_instance.update_findings_severity(body=body)

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
##### 

```ruby
# Apply a severity override to security findings returns "Accepted" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.access_token = ENV["DD_BEARER_TOKEN"]
  config.unstable_operations["v2.update_findings_severity".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new

body = DatadogAPIClient::V2::SeverityOverrideRequest.new({
  data: DatadogAPIClient::V2::SeverityOverrideRequestData.new({
    attributes: DatadogAPIClient::V2::SeverityOverrideRequestDataAttributes.new({
      severity: DatadogAPIClient::V2::SeverityOverrideSet.new({
        action: DatadogAPIClient::V2::SeverityOverrideSetActionType::SET,
        description: "Database contains sensitive data.",
        value: DatadogAPIClient::V2::SeverityOverrideValue::HIGH,
      }),
    }),
    relationships: DatadogAPIClient::V2::SeverityOverrideRequestDataRelationships.new({
      findings: DatadogAPIClient::V2::Findings.new({
        data: [
          DatadogAPIClient::V2::FindingData.new({
            id: "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=",
            type: DatadogAPIClient::V2::FindingDataType::FINDINGS,
          }),
        ],
      }),
    }),
    type: DatadogAPIClient::V2::SeverityOverrideDataType::SEVERITY_OVERRIDE,
  }),
})
p api_instance.update_findings_severity(body)
```

##### 

```ruby
# Clear the severity override of security findings returns "Accepted" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
  config.access_token = ENV["DD_BEARER_TOKEN"]
  config.unstable_operations["v2.update_findings_severity".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new

body = DatadogAPIClient::V2::SeverityOverrideRequest.new({
  data: DatadogAPIClient::V2::SeverityOverrideRequestData.new({
    attributes: DatadogAPIClient::V2::SeverityOverrideRequestDataAttributes.new({
      severity: DatadogAPIClient::V2::SeverityOverrideClear.new({
        action: DatadogAPIClient::V2::SeverityOverrideClearActionType::CLEAR,
      }),
    }),
    relationships: DatadogAPIClient::V2::SeverityOverrideRequestDataRelationships.new({
      findings: DatadogAPIClient::V2::Findings.new({
        data: [
          DatadogAPIClient::V2::FindingData.new({
            id: "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=",
            type: DatadogAPIClient::V2::FindingDataType::FINDINGS,
          }),
        ],
      }),
    }),
    type: DatadogAPIClient::V2::SeverityOverrideDataType::SEVERITY_OVERRIDE,
  }),
})
p api_instance.update_findings_severity(body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
##### 

```rust
// Apply a severity override to security findings returns "Accepted" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI;
use datadog_api_client::datadogV2::model::FindingData;
use datadog_api_client::datadogV2::model::FindingDataType;
use datadog_api_client::datadogV2::model::Findings;
use datadog_api_client::datadogV2::model::SeverityOverrideAttributes;
use datadog_api_client::datadogV2::model::SeverityOverrideDataType;
use datadog_api_client::datadogV2::model::SeverityOverrideRequest;
use datadog_api_client::datadogV2::model::SeverityOverrideRequestData;
use datadog_api_client::datadogV2::model::SeverityOverrideRequestDataAttributes;
use datadog_api_client::datadogV2::model::SeverityOverrideRequestDataRelationships;
use datadog_api_client::datadogV2::model::SeverityOverrideSet;
use datadog_api_client::datadogV2::model::SeverityOverrideSetActionType;
use datadog_api_client::datadogV2::model::SeverityOverrideValue;

#[tokio::main]
async fn main() {
    let body = SeverityOverrideRequest::new(SeverityOverrideRequestData::new(
        SeverityOverrideRequestDataAttributes::new(
            SeverityOverrideAttributes::SeverityOverrideSet(Box::new(
                SeverityOverrideSet::new(
                    SeverityOverrideSetActionType::SET,
                    SeverityOverrideValue::HIGH,
                )
                .description("Database contains sensitive data.".to_string()),
            )),
        ),
        SeverityOverrideRequestDataRelationships::new(Findings::new().data(vec![
            FindingData::new(
                "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=".to_string(),
                FindingDataType::FINDINGS,
            ),
        ])),
        SeverityOverrideDataType::SEVERITY_OVERRIDE,
    ));
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.update_findings_severity", true);
    let api = SecurityMonitoringAPI::with_config(configuration);
    let resp = api.update_findings_severity(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

##### 

```rust
// Clear the severity override of security findings returns "Accepted" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI;
use datadog_api_client::datadogV2::model::FindingData;
use datadog_api_client::datadogV2::model::FindingDataType;
use datadog_api_client::datadogV2::model::Findings;
use datadog_api_client::datadogV2::model::SeverityOverrideAttributes;
use datadog_api_client::datadogV2::model::SeverityOverrideClear;
use datadog_api_client::datadogV2::model::SeverityOverrideClearActionType;
use datadog_api_client::datadogV2::model::SeverityOverrideDataType;
use datadog_api_client::datadogV2::model::SeverityOverrideRequest;
use datadog_api_client::datadogV2::model::SeverityOverrideRequestData;
use datadog_api_client::datadogV2::model::SeverityOverrideRequestDataAttributes;
use datadog_api_client::datadogV2::model::SeverityOverrideRequestDataRelationships;

#[tokio::main]
async fn main() {
    let body = SeverityOverrideRequest::new(SeverityOverrideRequestData::new(
        SeverityOverrideRequestDataAttributes::new(
            SeverityOverrideAttributes::SeverityOverrideClear(Box::new(
                SeverityOverrideClear::new(SeverityOverrideClearActionType::CLEAR),
            )),
        ),
        SeverityOverrideRequestDataRelationships::new(Findings::new().data(vec![
            FindingData::new(
                "ZGVmLTAwMC0wYmd-MDE4NjcyMDJkMzE4MDE5ODY5MGE4ZmQ2MmFlMjg0Y2M=".to_string(),
                FindingDataType::FINDINGS,
            ),
        ])),
        SeverityOverrideDataType::SEVERITY_OVERRIDE,
    ));
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.update_findings_severity", true);
    let api = SecurityMonitoringAPI::with_config(configuration);
    let resp = api.update_findings_severity(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
{% /tab %}
