---
title: "Get Addon Cache Consistency"
method: GET
path: "/api/v1/admin/plans/addon-cache-consistency"
tags: ["admin-plans"]
---

# Get Addon Cache Consistency

`GET /api/v1/admin/plans/addon-cache-consistency`

## Request

- Base URL: `https://memory.kagura-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://memory.kagura-ai.com/api/v1/admin/plans/addon-cache-consistency`
- Auth: none declared

Detect workspaces whose addon cache columns drifted from the row SSoT.

Issue #799. For every active (non-deleted) workspace and every addon type
in ``_ADDON_FIELD_SPECS``, compares the cached ``addon_*_bonus`` column to
``SUM(active WorkspaceAddon.quantity) × unit_value`` — the same invariant
enforced by ``AddonCalculatorService.recalculate_workspace_bonuses`` and
asserted by ``tests/integration/_addon_helpers.assert_addon_invariant``.

On-demand audit, not a startup probe: the ``e23_799`` migration brings the
live count to 0, so a per-boot full-table scan (all workspaces × 9 columns)
would be wasted work. Each drifted column is logged at WARNING and returned
for admin review.

Returns:
    List of drifted (workspace, addon_type) entries. Empty when healthy.

## Response `200`

Successful Response

- AddonCacheDriftEntry[]
  - `workspace_id` string, required
  - `workspace_name` string, required
  - `addon_type` string, required
  - `cache_column` string, required
  - `cache_value` integer, required
  - `expected_value` integer, required

---

[API](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud.md) · [All operations](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/revisions/aa9df1a21db9?raw)
