---
title: "Run the score time-series sweep"
method: POST
path: "/api/v1/ackdb/scores/snapshot"
tags: ["ackDB"]
---

# Run the score time-series sweep

`POST /api/v1/ackdb/scores/snapshot`

## Request

- Base URL: `http://localhost:3009`
- URL: `http://localhost:3009/api/v1/ackdb/scores/snapshot`
- Auth: HTTP bearer

Computes every ENABLED definition (both grains) over its live population — the same compile path as the sc__ columns — and appends CHANGE-ONLY `score.changed` events: first observation, label change, or |Δ| ≥ epsilon (default 0.5) vs the LAST EMITTED value (slow drift accumulates until it crosses the threshold). Naturally idempotent — a re-run with unchanged data emits nothing. The nightly cron runs this per tenant; this endpoint is the manual/API trigger.

## Request body

- object
  - `scoreKey` string: Narrow the sweep to one definition.
  - `epsilon` number: Emission threshold override (0–50; default 0.5).

## Response `200`

Sweep summary.

- object
  - `definitions` object[], required
    - `scoreKey` string, required
    - `grain` 'company' | 'person', required
    - `subjects` integer, required: Rows computed: the grain's active rows, narrowed to the definition's scope segment (#443).
    - `emitted` integer, required
    - `exited` integer, required: Of `emitted`, EXIT emissions (#443): rows that were scored and have now left the definition's scope segment. Recorded as `score.changed` with `score: null` so a locf series stops instead of carrying a stale value. Scoped definitions only.
    - `skippedNoAnchor` integer, required: Person grain: humans with no affiliation edge to anchor the event.
  - `totalEmitted` integer, required
  - `epsilon` number, required

## Other responses

- `400`: Invalid epsilon.

---

[API](https://skmtc.dev/floqer/apis/floqer-public-api.md) - [All operations](https://skmtc.dev/floqer/apis/floqer-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/floqer/apis/floqer-public-api/revisions/fce50dc07b20?raw)
