---
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}`

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.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
