---
url: "https://vueda.dev/v3/reference/api/py/vueda.history.actions.md"
title: "history.actions"
---

# history.actions

## Overview

Assemble the action-grouped history response from visible event rows.

The database decides what is visible and how events group. This module turns those rows into the
published shape: an action, its events, and each event's field changes. It resolves every
referenced row and every acting user in one query per model, so a page costs the same whether it
carries one change or a thousand.

## `build_action_groups` {#build_action_groups}

Assemble one page of action groups.

``groups`` are the paginated group rows and ``events`` every visible event belonging to them,
already ordered and annotated with their ``relation``.

### Signature {#build_action_groups-signature}

`build_action_groups(groups, events)`

#### Parameters {#build_action_groups-parameters}

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <span id="build_action_groups-param-groups">groups</span> |  | yes |  |  |
| <span id="build_action_groups-param-events">events</span> |  | yes |  |  |

### Source {#build_action_groups-source}

`server/vueda/history/actions.py:112`

## Source

`server/vueda/history/actions.py`
