---
title: "Update Scanning Group"
method: PATCH
path: "/api/v2/sensitive-data-scanner/config/groups/{group_id}"
tags: ["Sensitive Data Scanner"]
---

# Update Scanning Group

`PATCH /api/v2/sensitive-data-scanner/config/groups/{group_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/sensitive-data-scanner/config/groups/{group_id}`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

Update a group, including the order of the rules.
Rules within the group are reordered by including a rules relationship. If the rules
relationship is present, its data section MUST contain linkages for all of the rules
currently in the group, and MUST NOT contain any others.

## Path parameters

- `group_id` string, required

## Request body

- SensitiveDataScannerGroupUpdateRequest: Update group request.
  - `data` SensitiveDataScannerGroupUpdate, required: Data related to the update of a group.
    - `attributes` SensitiveDataScannerGroupAttributes: Attributes of the Sensitive Data Scanner group.
      - `description` string: Description of the group.
      - `filter` SensitiveDataScannerFilter: Filter for the Scanning Group.
        - `query` string: Query to filter the events.
      - `is_enabled` boolean: Whether or not the group is enabled.
      - `name` string: Name of the group.
      - `product_list` SensitiveDataScannerProduct[]: List of products the scanning group applies.
      - `samplings` SensitiveDataScannerSamplings[]: List of sampling rates per product type.
        - `product` 'logs' | 'rum' | 'events' | 'apm': Datadog product onto which Sensitive Data Scanner can be activated.
        - `rate` number, double: Rate at which data in product type will be scanned, as a percentage.
    - `id` string: ID of the group.
    - `relationships` SensitiveDataScannerGroupRelationships: Relationships of the group.
      - `configuration` SensitiveDataScannerConfigurationData: A Sensitive Data Scanner configuration data.
        - `data` SensitiveDataScannerConfiguration: A Sensitive Data Scanner configuration.
          - `id` string: ID of the configuration.
          - `type` 'sensitive_data_scanner_configuration': Sensitive Data Scanner configuration type.
      - `rules` SensitiveDataScannerRuleData: Rules included in the group.
        - `data` SensitiveDataScannerRule[]: Rules included in the group. The order is important.
          - `id` string: ID of the rule.
          - `type` 'sensitive_data_scanner_rule': Sensitive Data Scanner rule type.
    - `type` 'sensitive_data_scanner_group': Sensitive Data Scanner group type.
  - `meta` SensitiveDataScannerMetaVersionOnly, required: Meta payload containing information about the API.
    - `version` integer: Version of the API (optional).

## Response `200`

OK

- SensitiveDataScannerGroupUpdateResponse: Update group response.
  - `meta` SensitiveDataScannerMetaVersionOnly: Meta payload containing information about the API.
    - `version` integer: Version of the API (optional).

## Other responses

- `400`: Bad Request
- `403`: Authentication Error
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
