> This page is for API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.eon.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.eon.io/_mcp/server.

# Update Finding Exclusion

PUT https://%7Baccount-domain%7D.console.eon.io/api/v1/projects/{projectId}/finding-exclusions/{findingExclusionId}
Content-Type: application/json

Updates a finding exclusion.

This operation replaces the entire finding exclusion object.
Omitted fields are overwritten.
Updating an exclusion has no effect on in-progress scans.


Reference: https://docs.eon.io/api/api-reference/threat-detection/finding-exclusions/update-finding-exclusion

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `projectId` (string, required) — ID of the project the finding exclusion is in. You can get your project ID from the [API Credentials](https://console.eon.io/global-management/api-credentials) page in your global management console.
- `findingExclusionId` (string, required) — ID of the finding exclusion to update.

### Body (application/json)

This endpoint expects an UpdateFindingExclusionRequest.

- `scope` (enum, required) — Whether the exclusion applies to a single resource or to all resources in the Eon account. If set to `RESOURCE`, a resource ID must be set in `providerResourceId`.
  - Allowed values: `RESOURCE`, `ACCOUNT`
- `value` (string, required) — Matching value to exclude. The value set in this field depends on the specified `type`. - `PATH`: Matches files whose path starts with the specified value, case-sensitive. For example, `/data/tmp` matches `/data/tmp2/report.csv`. Linux paths are case-sensitive. Windows paths are case-insensitive, normalize for the file separator, and start with the drive letter. For example, `C:\Users\App\Cache` matches `c:/users/app/cache`. - `TABLE`: Exact table name. - `DATABASE`: Exact database name. - `KMS_KEY`: Either a KMS key ARN, or an AWS account ID to trust all keys in the account. Available for the ransomware detector only.
- `type` (enum, required) — Whether the finding is set to a file path, a database table, a whole database, or objects encrypted with a trusted KMS key. Used in combination with `value`.
  - Allowed values: `PATH`, `TABLE`, `DATABASE`, `KMS_KEY`
- `detector` (enum, required) — Detector whose findings to suppress. `MALWARE` can only exclude paths: databases aren't scanned for malware.
  - Allowed values: `RANSOMWARE_BEHAVIOR`, `DATA_ANOMALY`, `MALWARE`
- `providerResourceId` (string, optional) — Cloud provider ID of the resource to apply the exclusion to, such as an EC2 instance ID or an Azure resource ID. Required when `scope` is `RESOURCE`, and must be omitted when it's `ACCOUNT`.

## Response

### 200

Finding exclusion updated.

- `findingExclusion` (FindingExclusion, required) — Updated finding exclusion.

## Errors

### 400 Bad Request Error

Invalid request.

- `error` (string, optional)

### 404 Not Found Error

Project, finding exclusion, or resource wasn't found.

- `error` (string, optional)

### 409 Conflict Error

The specified cloud-provider-assigned resource ID belongs to more than one resource.

- `error` (string, optional)

## Types

### FindingExclusion

Exclusion that stops a detector from reporting findings for matching files, tables, or databases. Can be scoped either to a single resource or to all resources in your inventory.

- `id` (string, required) — ID of the finding exclusion.
- `scope` (enum, required) — Whether the exclusion applies to a single resource or to all resources in the Eon account. If set to `RESOURCE`, a resource ID must be set in `providerResourceId`.
  - Allowed values: `RESOURCE`, `ACCOUNT`
- `value` (string, required) — Matching value to exclude. The value set in this field depends on the specified `type`. - `PATH`: Matches files whose path starts with the specified value, case-sensitive. For example, `/data/tmp` matches `/data/tmp2/report.csv`. Linux paths are case-sensitive. Windows paths are case-insensitive, normalize for the file separator, and start with the drive letter. For example, `C:\Users\App\Cache` matches `c:/users/app/cache`. - `TABLE`: Exact table name. - `DATABASE`: Exact database name. - `KMS_KEY`: Either a KMS key ARN, or an AWS account ID to trust all keys in the account. Available for the ransomware detector only.
- `type` (enum, required) — Whether the finding is set to a file path, a database table, a whole database, or objects encrypted with a trusted KMS key. Used in combination with `value`.
  - Allowed values: `PATH`, `TABLE`, `DATABASE`, `KMS_KEY`
- `detector` (enum, required) — Detector type the exclusion applies to. If set to `MALWARE`, only paths can be excluded.
  - Allowed values: `RANSOMWARE_BEHAVIOR`, `DATA_ANOMALY`, `MALWARE`
- `updatedAt` (datetime, required) — Date and time the exclusion was updated.
- `providerResourceId` (string, optional) — Cloud-provider-assigned ID of the resource the exclusion applies to. Set when scope is `RESOURCE`.

## Examples

**Request**

```json
{
  "scope": "RESOURCE",
  "value": "/var/cache",
  "type": "PATH",
  "detector": "RANSOMWARE_BEHAVIOR"
}
```

**Response**

```json
{
  "findingExclusion": {
    "id": "4c1f3b0e-8d9a-4f55-9b1e-2d6f3a7c8e10",
    "scope": "RESOURCE",
    "value": "/var/cache",
    "type": "PATH",
    "detector": "RANSOMWARE_BEHAVIOR",
    "updatedAt": "2024-01-15T09:30:00Z",
    "providerResourceId": "i-0abc123def4567890"
  }
}
```

**SDK Code**

```python
import requests

url = "https://{account-domain}.console.eon.io/api/v1/projects/733888d8-2573-5f9a-b81d-21f051d24fda/finding-exclusions/findingExclusionId"

payload = {
    "scope": "RESOURCE",
    "value": "/var/cache",
    "type": "PATH",
    "detector": "RANSOMWARE_BEHAVIOR"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{account-domain}.console.eon.io/api/v1/projects/733888d8-2573-5f9a-b81d-21f051d24fda/finding-exclusions/findingExclusionId';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"scope":"RESOURCE","value":"/var/cache","type":"PATH","detector":"RANSOMWARE_BEHAVIOR"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://{account-domain}.console.eon.io/api/v1/projects/733888d8-2573-5f9a-b81d-21f051d24fda/finding-exclusions/findingExclusionId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"scope\": \"RESOURCE\",\n  \"value\": \"/var/cache\",\n  \"type\": \"PATH\",\n  \"detector\": \"RANSOMWARE_BEHAVIOR\"\n}")
  .asString();
```