# Review Row Grouping

Configure default grouping behavior for access review rows. When enabled, review rows are automatically organized by the specified column values, making it easier for reviewers to process large datasets by grouping related items together.

The setting allows admins to configure a default group by column and collapsed/expanded behavior, either globally or per-workflow.

## Parameters

| Name                             | Type   | Required | In   | Description                                                                                                                                                                                                                                 |
| -------------------------------- | ------ | -------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `workflow_id`                    | string | No       | body | The workflow ID to apply the setting to                                                                                                                                                                                                     |
| `value.group_by_column`          | string | Yes      | body | The column to group rows by (e.g. `destination.veza_unique_name`, `source.veza_unique_name`, `status`, `risk_level`). Must be a valid column name (same as in CreateAccessResultsGroupCollection). If empty or unset, grouping is disabled. |
| `value.expand_groups_by_default` | bool   | Yes      | body | When set to true, row groups will be expanded by default when the review loads; if false, they'll be collapsed. This flag is ignored when group\_by\_column is empty.                                                                       |

## Get Row Grouping Settings

`GET /api/private/workflows/access/global_settings/rows_group_by_setting`

### Get Global Setting

```bash
curl 'https://your-organization.vezacloud.com/api/private/workflows/access/global_settings/rows_group_by_setting' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer YOUR_BEARER_TOKEN'
```

### Get Workflow-Scoped Setting

```bash
curl 'https://your-organization.vezacloud.com/api/private/workflows/access/global_settings/rows_group_by_setting?workflow_id=01983256-911c-7906-9d75-d69871c877fd' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer YOUR_BEARER_TOKEN'
```

### Example Response

```json
{
  "value": {
    "group_by_column": "status",
    "expand_groups_by_default": true
  }
}
```

## Set Row Grouping Settings

`PUT /api/private/workflows/access/global_settings/rows_group_by_setting`

### Example: Set Global Setting

```bash
curl -X PUT 'https://your-organization.vezacloud.com/api/private/workflows/access/global_settings/rows_group_by_setting' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer YOUR_BEARER_TOKEN' \
    -d '{
      "value": {
        "group_by_column": "destination.veza_unique_name",
        "expand_groups_by_default": false
      }
    }'
```

### Example: Set Workflow-Scoped Setting

```bash
curl -X PUT 'https://your-organization.vezacloud.com/api/private/workflows/access/global_settings/rows_group_by_setting' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer YOUR_BEARER_TOKEN' \
    -d '{
      "workflow_id": "01983256-911c-7906-9d75-d69871c877fd",
      "value": {
        "group_by_column": "destination.veza_unique_name",
        "expand_groups_by_default": false
      }
    }'
```

### Response

```json
{}  // Empty on success
```

## Common Column Examples

* `destination.veza_unique_name` - Group by resource name
* `source.veza_unique_name` - Group by identity name
* `status` - Group by review status
* `risk_level` - Group by risk level
* `destination.type` - Group by resource type
* `decision` - Group by decision status

{% hint style="info" %}
Row grouping settings apply when reviewers first load a review. Users can manually change grouping options in the review interface regardless of these default settings. When configured for a specific review configuration (using `workflow_id`), those settings override any global grouping settings for reviews created from that configuration.

Grouping helps organize large reviews by collecting related rows together, making it easier to identify patterns and make decisions efficiently. Common grouping strategies include grouping by department, resource type, permission level, or risk assessment.
{% endhint %}


---

# Agent Instructions: 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.veza.com/4yItIzMvkpAvMVFAamTf/developers/api/workflows/access-review-settings/reviewrowgrouping.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.
