---
title: "Series Persistence"
method: GET
path: "/api/v1/series/{series_key}/persistence"
tags: ["series"]
---

# Series Persistence

`GET /api/v1/series/{series_key}/persistence`

## Request

- Base URL: `https://statsmapped.com`
- URL: `https://statsmapped.com/api/v1/series/{series_key}/persistence`
- Auth: none declared

TODO.md cycle 78 POC C1: backs the deep-dive page's own "How often has this
moved?" section -- a dedicated, small endpoint (same precedent as
series_history()) rather than growing dataset_detail()'s own response,
which every OTHER caller of that endpoint would then pay for whether they
use this section or not.

## Path parameters

- `series_key` string, required

## Query parameters

- `periods` integer

## Response `200`

Successful Response

- SeriesPersistence: TODO.md cycle 78 POC C1: one series' own persistence detail for its deep-dive page's "How often has this moved?" section -- see `_series_persistence()`'s own docstring for the computation. Same zero-inflation reasoning as `PersistentAlert.field_median_fired` (POC A's own docstring): most series never fire, so a bare "fired 3 of 8" reads as notable when it may be typical for the whole stat_key -- this field is mandatory for the same reason.
  - `country` string
  - `series_key` string, required
  - `periods_seen` integer, required
  - `alerts_fired` integer, required
  - `same_direction_run` integer, required
  - `run_direction` string, nullable
  - `field_median_fired` number, required
  - `periods` PersistenceCell[], required
    - `country` string
    - `period_date` string, required
    - `fired` boolean, required
    - `direction` string, nullable
  - `ranking_direction` string, nullable

## Other responses

- `400`: Bad request
- `401`: Missing or invalid credentials
- `403`: Not authorized for this request
- `404`: Not found
- `422`: Validation error
- `429`: Rate limited

---

[API](https://skmtc.dev/statsmapped/apis/statsmapped-api.md) · [All operations](https://skmtc.dev/statsmapped/apis/statsmapped-api/llms.txt) · [OpenAPI document](https://skmtc.dev/statsmapped/apis/statsmapped-api/revisions/7c5b264d05b7?raw)
