---
title: "Get Shared Data Summary"
method: GET
path: "/api/admin/shared-data/summary"
tags: ["admin"]
---

# Get Shared Data Summary

`GET /api/admin/shared-data/summary`

Aggregate counts for the Overview "Research pilot" panel.

Computes consenting-user totals, weekly activity counts (conversations
+ heartbeats + errors), open-report count, and a small leaderboard
of the most active consenting users this week. Cheap enough to run
on every Overview load: a handful of indexed COUNT and GROUP BY
queries scoped to consenting user ids.

Only counts and a small leaderboard surface here. Message bodies,
memory text, and per-event content stay behind the existing
per-conversation endpoints, which already PII-redact and audit-log
every read.

The "this week" window is the rolling 7 days ending now (UTC).

## Response `200`

Successful Response

- SharedDataSummaryResponse — Aggregate counts across the consenting-user pilot population. Used by the Overview "Research pilot" panel to render at-a-glance metrics that previously required visiting the Shared, Reported, and per-user Activity tabs separately. Fields are deliberately conservative: only counts and a small leaderboard, never message bodies or memory. The bodies stay behind the existing per-conversation endpoints, which already PII-redact and audit-log every read. ``consents_changed_this_week`` counts every user currently consenting whose ``data_sharing_consent_at`` toggled within the last 7 days. The OSS column ticks on every change (opt-in OR opt-out), so the count surfaces "consent state moved recently" rather than "first-time opt-ins". A user who toggles off and back on within the week still counts. A heartbeat-error metric was deliberately excluded: the OSS heartbeat scheduler writes ``action_type`` of ``send | skip | cleanup`` and never ``error``, so any "errors this week" count we built here would always be zero. If we want a real error signal in the future, it has to come from a different source (LLMUsageLog failures, the Reported queue, structured logs).
  - `consenting_user_count` integer, required
  - `consents_changed_this_week` integer, required
  - `conversations_this_week` integer, required
  - `heartbeats_this_week` integer, required
  - `open_reports_count` integer, required
  - `top_users_this_week` SharedDataTopUserItem[], required
    - `id` string, required
    - `email` string, required
    - `user_id` string, required
    - `messages_this_week` integer, required

---

[API](https://skmtc.net/mozilla-ai/apis/clawbolt.md) · [All operations](https://skmtc.net/mozilla-ai/apis/clawbolt/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mozilla-ai/clawbolt/revisions/0e52fe5f8d33/schema)
