Skip to content

admin ​

53 endpoints at a glance
MethodPathSummary
POST/admin/acousticbrainz/backfillAdmin Acousticbrainz Backfill
GET/admin/acousticbrainz/statusAdmin Acousticbrainz Status
POST/admin/askAdmin Ask
GET/admin/ask/conversationsAdmin Ask Conversations
DELETE/admin/ask/conversations/{conversation_id}Admin Delete Ask Conversation
GET/admin/ask/conversations/{conversation_id}Admin Ask Conversation
POST/admin/ask/wishlistAdmin Ask Wishlist
POST/admin/canonical/albums/{target_id}/mergeAdmin Merge Albums
POST/admin/canonical/artists/{target_id}/mergeAdmin Merge Artists
GET/admin/canonical/duplicatesAdmin Canonical Duplicates
GET/admin/canonical/enrich/album-track-coverageAdmin Album Track Coverage
POST/admin/canonical/enrich/artist-reprojectAdmin Enrich Artist Reproject
GET/admin/canonical/enrich/artist-reproject-coverageAdmin Artist Reproject Coverage
POST/admin/canonical/enrich/audio-qualityAdmin Enrich Audio Quality
GET/admin/canonical/enrich/audio-quality-coverageAdmin Audio Quality Coverage
GET/admin/canonical/enrich/deezer-coverageAdmin Deezer Coverage
GET/admin/canonical/enrich/discogs-coverageAdmin Discogs Coverage
POST/admin/canonical/enrich/discogs-discoverAdmin Discogs Discover
POST/admin/canonical/enrich/discogs-reprojectAdmin Discogs Reproject
POST/admin/canonical/enrich/discover-deezerAdmin Discover Deezer
POST/admin/canonical/enrich/discover-itunesAdmin Discover Itunes
DELETE/admin/canonical/enrich/errorsAdmin Clear Enrich Errors
GET/admin/canonical/enrich/errorsAdmin Enrich Errors
POST/admin/canonical/enrich/hydrate-mbAdmin Hydrate Mb
GET/admin/canonical/enrich/itunes-coverageAdmin Itunes Coverage
POST/admin/canonical/enrich/link-album-tracksAdmin Link Album Tracks
POST/admin/canonical/enrich/lyricsAdmin Enrich Lyrics
GET/admin/canonical/enrich/lyrics-coverageAdmin Lyrics Coverage
GET/admin/canonical/enrich/mb-coverageAdmin Mb Coverage
POST/admin/canonical/enrich/mb-creditsAdmin Enrich Mb Credits
GET/admin/canonical/enrich/mb-credits-coverageAdmin Mb Credits Coverage
POST/admin/canonical/enrich/mb-relationsAdmin Enrich Mb Relations
GET/admin/canonical/enrich/mb-relations-coverageAdmin Mb Relations Coverage
POST/admin/canonical/enrich/promote-lastfm-mbidsAdmin Promote Lastfm Mbids
POST/admin/canonical/enrich/tagsAdmin Enrich Tags
GET/admin/canonical/enrich/tags-coverageAdmin Tags Coverage
POST/admin/canonical/migrateAdmin Run Migration
POST/admin/canonical/rebuildAdmin Run Rebuild
GET/admin/canonical/statsAdmin Canonical Stats
POST/admin/canonical/tracks/{target_id}/mergeAdmin Merge Tracks
GET/admin/db-statsAdmin Db Stats
POST/admin/radio/discovery-albums/backfillAdmin Discovery Album Backfill
GET/admin/radio/discovery-albums/coverageAdmin Discovery Album Coverage
DELETE/admin/scrobbles/{scrobble_id}Admin Delete Scrobble
GET/admin/scrobbles/invalidAdmin List Invalid Scrobbles
POST/admin/scrobbles/invalid/purgeAdmin Purge Invalid Scrobbles
GET/admin/spotify/audio-features-cron-statusAdmin Spotify Audio Features Cron Status
GET/admin/task-historyAdmin Task History
GET/admin/task-history/{task_id}Admin Task History Detail
POST/admin/task-history/{task_id}/cancelAdmin Task History Cancel
GET/admin/task-history/runningAdmin Task History Running
GET/admin/tautulli/eventsAdmin Tautulli Events
GET/admin/tautulli/statsAdmin Tautulli Stats

admin​


Admin Db Stats​

GET
/admin/db-stats

Return the full admin dashboard payload.

stale_days controls the threshold for the "stale connected users"
list (default 14). Recomputed on every request — no caching.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

stale_days
Type
integer
Default
14

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin List Invalid Scrobbles​

GET
/admin/scrobbles/invalid

List scrobbles with impossible timestamps.

Always includes per-bucket counts so the SPA's tabs can stay current
after a delete without a second request.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

kind
Type
string
Default
"all"
page
Type
integer
Default
1
limit
Type
integer
Default
50

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Delete Scrobble​

DELETE
/admin/scrobbles/{scrobble_id}

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

scrobble_id*
Type
string
Required

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Purge Invalid Scrobbles​

POST
/admin/scrobbles/invalid/purge

Parameters​

Header Parameters

authorization
x-api-key

Request Body​

application/json
JSON
{
  
"kind": "string"
}

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Body

Samples​


Admin Tautulli Events​

GET
/admin/tautulli/events

List received Tautulli events, newest-first, with optional filters.

Always returns the distinct filter values so the SPA renders its
dropdowns in one request (same contract as /admin/task-history).

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

page
Type
integer
Default
1
limit
Type
integer
Default
50
event
category
media_type
user
since_days
q

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Tautulli Stats​

GET
/admin/tautulli/stats

Operational stats for the Tautulli-events panel.

Accepts the same filters as the list endpoint so the numbers always
describe the slice the table is showing.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

days
Type
integer
Default
30
event
category
media_type
user
since_days
q

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Task History​

GET
/admin/task-history

List recent task runs, newest-first, with optional filters.

Always returns names (every distinct task name seen) and
counts_by_status so the SPA can render its filter dropdown +
status badges in one request.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

page
Type
integer
Default
1
limit
Type
integer
Default
50
name
status

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Task History Running​

GET
/admin/task-history/running

The currently-running task for a backfill family, or null.

The Backfills page calls this per card on mount (passing the card's
task-name prefix) so a page reload re-binds to an in-flight task —
showing live progress + a Stop button instead of a fresh, runnable
card that would let you start a duplicate.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

name_prefix

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Task History Detail​

GET
/admin/task-history/{task_id}

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

task_id*
Type
string
Required

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Task History Cancel​

POST
/admin/task-history/{task_id}/cancel

Request cooperative cancellation of a running background task.

Sets an in-process flag the task's loop checks each iteration; the
task stops at its next checkpoint and is recorded as cancelled
(not failed). Returns 404 if the task doesn't exist. A no-op
(was_running: false) if the task already finished — the SPA treats
that as "already done" and just refreshes.

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

task_id*
Type
string
Required

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Spotify Audio Features Cron Status​

GET
/admin/spotify/audio-features-cron-status

Recent runs + a "looks deprecated" heuristic for the
spotify_audio_features_backfill cron.

Spotify deprecated /v1/audio-features in November 2024. Apps
without an exemption get 403 on every call; the cron silently
records status: "fetch_failed" in task_history and exits.
This endpoint surfaces the pattern so admins can decide whether
to lower the cron's cadence or disable it. See
:mod:api.admin.spotify_status for the heuristic.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
20

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Acousticbrainz Status​

GET
/admin/acousticbrainz/status

Coverage counts for the AcousticBrainz feature backfill.

Returns how many MBIDs we've looked up (positive + negative) plus
how many MusicBrainz-linked canonical tracks still have no AB
lookup — i.e. the backfill's remaining work.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Acousticbrainz Backfill​

POST
/admin/acousticbrainz/backfill

Kick off one AcousticBrainz backfill batch as a background task.

Fire-and-forget — returns a task_id the SPA polls. Walks
MusicBrainz-linked canonical tracks with no AB lookup yet, fetches
each from the (maintenance-mode, CC0) AcousticBrainz API, caches
the result, and re-merges the canonical so ab_features lands.

Manual-trigger only — there is intentionally no cron. The AB
service is a free single-author host; we don't impose background
load on it. Re-click to process the next batch.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
250

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Discovery Album Coverage​

GET
/admin/radio/discovery-albums/coverage

Coverage for the Discover-page album backfill.

Returns how many track recommendations have an album label and how
many still need one — i.e. the backfill's remaining work.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Discovery Album Backfill​

POST
/admin/radio/discovery-albums/backfill

Backfill album_title/album_id on existing discovery rows.

Fire-and-forget background task. not_playable rows fill free from
the canonical track's album; not_in_library tracks resolve the
album via a cached, paced LastFM track.getInfo lookup (each track
is looked up at most once). limit bounds rows scanned per run —
re-click to process the next batch.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
200

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Ask​

POST
/admin/ask

Ask the assistant a question; append both turns to a conversation.

Creates a conversation when conversation_id is absent. Always 200
with a state (ok / not_configured / failed) so the SPA
can degrade instead of erroring. A failed answer is not persisted —
the user's question stays in the box to retry.

Parameters​

Header Parameters

authorization
x-api-key

Request Body​

application/json
JSON
{
  
"question": "string",
  
"conversation_id": "string",
  
"entity_ref": "string"
}

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Body

Samples​


Admin Ask Conversations​

GET
/admin/ask/conversations

This admin's recent threads, newest first (no message bodies).

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
50

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Ask Conversation​

GET
/admin/ask/conversations/{conversation_id}

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

conversation_id*
Type
string
Required

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Delete Ask Conversation​

DELETE
/admin/ask/conversations/{conversation_id}

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

conversation_id*
Type
string
Required

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Ask Wishlist​

POST
/admin/ask/wishlist

Wishlist a suggestion the assistant surfaced.

Resolves by exact external identifier only — never by name. A
suggestion reaches here already confirmed in Deezer or MusicBrainz,
and seeding the canonical from that id is the same no-name-guessing
path the search fallback's click-through uses, so discovery can't
introduce a mislink. Seeds the canonical when we don't have it yet.

Parameters​

Header Parameters

authorization
x-api-key

Request Body​

application/json
JSON
{
  
"deezer_id": 0,
  
"mbid": "string"
}

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Body

Samples​


Admin Canonical Duplicates​

GET
/admin/canonical/duplicates

Library-wide duplicate-canonical groups for cleanup.

Aggregates media_artists (or media_albums / media_tracks)
by the dedup key — name_folded for artists, (artist_id, title_folded) for albums/tracks (artist-scoped so "Greatest Hits"
by different artists doesn't collapse). Returns groups with ≥2
non-tombstoned candidates, ordered by candidate-count desc so the
worst offenders surface first.

Each candidate carries the data the SPA needs to render a row
(picture/cover, source_count, sources bitmap, year). Pagination
is via page + limit; has_more indicates whether
more pages exist.

q is an optional substring filter applied BEFORE the
$group stage so it searches the whole collection — not just
the current page. For artists it matches name_folded; for
albums/tracks it matches title_folded OR the raw
artist_name (case-insensitive) so the user can find duplicates
by either title or performer.

No scrobble-count enrichment in v1 — would require a per-
candidate $lookup which dominates query time for canonicals with
many scrobbles. Can add later as a separate enrichment endpoint
called only when the user expands a group.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

kind*
Type
string
Required
page
Type
integer
Default
1
limit
Type
integer
Default
25
q

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Merge Albums​

POST
/admin/canonical/albums/{target_id}/merge

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

target_id*
Type
string
Required

Request Body​

application/json
JSON
{
  
"source_id": "string"
}

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value
Body

Samples​


Admin Merge Artists​

POST
/admin/canonical/artists/{target_id}/merge

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

target_id*
Type
string
Required

Request Body​

application/json
JSON
{
  
"source_id": "string"
}

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value
Body

Samples​


Admin Merge Tracks​

POST
/admin/canonical/tracks/{target_id}/merge

Parameters​

Header Parameters

authorization
x-api-key

Path Parameters

target_id*
Type
string
Required

Request Body​

application/json
JSON
{
  
"source_id": "string"
}

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value
Body

Samples​


Admin Run Migration​

POST
/admin/canonical/migrate

Full one-shot migration: backfill canonical + re-key user data.

Use after deploying the canonical layer onto an environment with
existing legacy user-data rows (those still carrying deezer_id
instead of canonical_id). Idempotent — safe to re-run; the
backfill phase just refreshes already-canonicalized entities.

Fire-and-forget: full migrations walk every source-cache entity
(typically thousands of docs) so they routinely take minutes.
The SPA polls /admin/task-history/{task_id} for progress.

Safety: source caches (lastfm_scrobbles, plex_*,
deezer_*, musicbrainz_*) are read-only during the entire
run. The only deletions are unresolvable rows in the user-action
collections (media_album_status + media_favorites). See
:mod:api.canonical.migrate for the full safety contract.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Run Rebuild​

POST
/admin/canonical/rebuild

Backfill-only: recompute every canonical doc from current sources.

Use after editing the priority tables or projector functions when
the existing canonical entities' merged shape needs to catch up.
Doesn't touch user-data (wishlist / owned / favorites) — those
already point at canonical IDs. Much cheaper than /migrate when
you only need to refresh the projection.

Fire-and-forget — see admin_run_migration for the rationale.

Safety: source caches are read-only; nothing is ever deleted. This
endpoint only writes to media_* and *_external_refs.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Canonical Stats​

GET
/admin/canonical/stats

Health view of the canonical layer.

Returns counts per canonical collection, total external refs, plus
a breakdown of refs by source (so admins can see "we know about N
Deezer albums but only M MusicBrainz release-groups"). Cheap reads
only — runs on every Migrations panel render.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Mb Coverage​

GET
/admin/canonical/enrich/mb-coverage

Per-kind MusicBrainz coverage: total canonicals, how many have an
MBID available to hydrate from, how many are already MB-cached.

The gap (with_mb_ref − mb_entities_cached) is the hydration backlog
"Hydrate all" drains.

mb_coverage is synchronous PyMongo (a few bulk reads + an
in-memory join). We offload it to a worker thread so it never blocks
the event loop — otherwise this admin page, which fires
/musicbrainz/admin/health and this endpoint together, would stall
the sibling request behind it (the cause of the earlier 15s timeout).

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Hydrate Mb​

POST
/admin/canonical/enrich/hydrate-mb

Kick off MB hydration for kind as a background task.

Fetches the MusicBrainz entity for every canonical that carries an
MB ref (e.g. stamped from a Plex mbid:// Guid) but has no cached
MB data yet. Each fetch caches the entity and fires the existing
reconcile, so the canonical re-merges with real MB metadata.

drain=False (default): one limit-sized batch (capped 1000) —
a quick top-up. drain=True: the "hydrate all" path — a single
task that walks the entire backlog (bounded by
HYDRATE_DRAIN_CAP) so the user doesn't have to click repeatedly.

MusicBrainz-throttled (1 rps); offloaded to a background task and
polled via /admin/task-history/{task_id}. Re-run to continue;
already-hydrated refs are skipped.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

kind
Type
string
Default
"track"
limit
Type
integer
Default
200
drain
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Promote Lastfm Mbids​

POST
/admin/canonical/enrich/promote-lastfm-mbids

Promote LastFM-held MBIDs to MusicBrainz refs for kind.

For canonicals minted from LastFM that carry an MBID in their
LastFM cache doc but no MusicBrainz ref, stamp the MB ref onto the
existing canonical (conflict-guarded — skips MBIDs already owned by
another canonical) and fetch the entity, so the canonical re-merges
with real MB data.

Only artist and track are eligible — LastFM album MBIDs are
release-vs-release-group-ambiguous and are handled in the discovery
phase instead.

MusicBrainz-throttled background task; poll
/admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

kind
Type
string
Default
"track"
limit
Type
integer
Default
200

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Deezer Coverage​

GET
/admin/canonical/enrich/deezer-coverage

Per-kind canonical-out Deezer coverage: total canonicals, how many
are Deezer-linked, how many are discoverable now (have an ISRC / UPC,
or — for artists — a Deezer-linked sibling).

Synchronous PyMongo offloaded to a worker thread so it never blocks
the event loop (see admin_mb_coverage).

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Discover Deezer​

POST
/admin/canonical/enrich/discover-deezer

Attach Deezer entities to canonicals by exact identifier.

Tracks match on ISRC, albums on UPC, artists cascade off a
Deezer-linked sibling — each stamped onto the existing canonical
(conflict-guarded), no name guessing. drain=True walks the whole
backlog in one task. Deezer-paced background task; poll
/admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

kind
Type
string
Default
"track"
limit
Type
integer
Default
200
drain
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Itunes Coverage​

GET
/admin/canonical/enrich/itunes-coverage

Per-kind canonical-out iTunes coverage: total canonicals, how many
are iTunes-linked, how many are discoverable now (album has a UPC,
track's album is iTunes-linked, or artist has an iTunes-linked sibling).

Synchronous PyMongo offloaded to a worker thread so it never blocks
the event loop (see admin_mb_coverage).

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Discover Itunes​

POST
/admin/canonical/enrich/discover-itunes

Attach iTunes entities to canonicals.

Albums match on UPC (exact barcode), artists cascade off an
iTunes-linked sibling, tracks match album-position-wise within an
already-linked album — each stamped onto the existing canonical
(conflict-guarded). drain=True walks the whole backlog in one
task. iTunes-paced (~3s/candidate, 20 req/min cap); poll
/admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

kind
Type
string
Default
"album"
limit
Type
integer
Default
200
drain
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Album Track Coverage​

GET
/admin/canonical/enrich/album-track-coverage

Per-source linkable backlog for album-anchored track linking: how
many albums carry the source ref, how many of those have unlinked
tracks, and the unlinked-track upper bound a "Link all" run targets.

Synchronous PyMongo offloaded to a worker thread (see
admin_mb_coverage).

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Link Album Tracks​

POST
/admin/canonical/enrich/link-album-tracks

Link an album's unlinked tracks to Deezer / MusicBrainz by matching
the source's tracklist to ours by (disc, track) position.

Edition-gated: a whole album is skipped unless its source tracklist
has matching track + disc counts and aligned titles — so partial /
wrong-edition mislinks don't happen. Harvests ISRCs as a side effect
(the matched track's full entity is fetched + re-merged).
title_fallback=True additionally links, inside albums the
edition gate rejects, tracks whose title is unique on both sides —
no position and no edition assumption. That is what links a local
27-track rip against a 25-track streaming edition, which the gate
alone can never do. Off by default: it is looser evidence, and the
summary counts it separately (title_matched).

drain=True walks the whole backlog. Source-paced background task;
poll /admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

source
Type
string
Default
"deezer"
limit
Type
integer
Default
200
drain
Type
boolean
Default
false
title_fallback
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Enrich Errors​

GET
/admin/canonical/enrich/errors

Deduped log of individual enrichment calls that failed.

One row per <source>:<kind>:<canonical_id> (the repeat-failing
entity, not a pile of duplicate rows) — so you can see which calls
are broken, not just an aggregate count. Rows clear themselves when
the entity later enriches successfully. source is the operation
(hydrate_mb / promote_lastfm / deezer_discover /
itunes_discover / isrc_link). Returns the rows plus a
counts map (per-source totals) for the section badges.

Synchronous PyMongo offloaded to a worker thread so it never blocks
the event loop.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

source
kind
limit
Type
integer
Default
200

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Clear Enrich Errors​

DELETE
/admin/canonical/enrich/errors

Clear the enrichment error log — all of it, or one source.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

source

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Lyrics Coverage​

GET
/admin/canonical/enrich/lyrics-coverage

Library-wide lyrics coverage: eligible tracks, how many have
lyrics (and synced), instrumentals, and the not-yet-tried backlog.

Synchronous PyMongo offloaded to a worker thread (see
admin_mb_coverage).

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Enrich Lyrics​

POST
/admin/canonical/enrich/lyrics

Fill the per-track lyrics cache (Plex harvest first, then LRCLIB).

drain=True walks the whole backlog in one task. LRCLIB-paced
background task; poll /admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
200
drain
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Mb Relations Coverage​

GET
/admin/canonical/enrich/mb-relations-coverage

How many MB-linked canonical artists have had their relations
(external links + members) fetched vs. the remaining backlog.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Enrich Mb Relations​

POST
/admin/canonical/enrich/mb-relations

Backfill MB external links + band membership onto canonical artists.

Re-fetches each MB-linked artist with the relation includes (MB-paced,
~1 req/s), re-projecting external_links / members /
member_of. drain=True walks the whole backlog in one task.
Poll /admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
200
drain
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Mb Credits Coverage​

GET
/admin/canonical/enrich/mb-credits-coverage

How many MB-linked canonical tracks have had their writer credits
resolved vs. the remaining backlog.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Enrich Mb Credits​

POST
/admin/canonical/enrich/mb-credits

Backfill composer/lyricist/writer credits onto canonical tracks.

Walks recording→work→artist (≥2 MB requests per track, MB-paced), so
this is the heaviest enrich drain. drain=True walks the whole
backlog. Poll /admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
100
drain
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Audio Quality Coverage​

GET
/admin/canonical/enrich/audio-quality-coverage

How many Plex-sourced canonical tracks carry an audio_quality
descriptor vs. the remaining (un-reprojected) backlog.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Enrich Audio Quality​

POST
/admin/canonical/enrich/audio-quality

Re-project local-file audio quality (codec / bit-depth / lossless)
onto Plex-sourced canonical tracks. No network — reads the already-
cached Plex mirror — so it's fast. drain=True walks the whole
backlog. Poll /admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
1000
drain
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Tags Coverage​

GET
/admin/canonical/enrich/tags-coverage

How many canonical tracks + albums carry the unified tags field
vs. the remaining (un-reprojected) backlog.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Enrich Tags​

POST
/admin/canonical/enrich/tags

Re-project the unified tags / moods / styles onto canonical tracks

  • albums. No network — combines already-cached Plex / MusicBrainz /
    LastFM / AcousticBrainz data — so it's fast. drain=True walks the
    whole backlog. Poll /admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
1000
drain
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Artist Reproject Coverage​

GET
/admin/canonical/enrich/artist-reproject-coverage

How many canonical artists have been re-projected (carry the
alt_names field) vs. the remaining backlog.

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Enrich Artist Reproject​

POST
/admin/canonical/enrich/artist-reproject

Re-project canonical artists from the already-cached source data.

No network, so fast: MusicBrainz alternate names, and — for any
artist whose cached MB row carries the relation includes — external
links and band membership too, re-parsed from raw. Only a row
that never had the includes needs the paced MB-relations backfill.

drain=True walks the whole backlog.

force=True re-projects every artist, not just those never
projected before. The coverage marker records that a re-projection
happened, not which projectors it ran, so without this a projector
fix reaches nobody while coverage reports 100%. Use it after changing
what a projector emits.

Poll /admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
2000
drain
Type
boolean
Default
false
force
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Discogs Coverage​

GET
/admin/canonical/enrich/discogs-coverage

Coverage for both Discogs backfills: barcode auto-link (UPC-bearing
albums → Discogs-linked) and re-project (counts of Discogs-linked
albums + artists).

Parameters​

Header Parameters

authorization
x-api-key

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers

Samples​


Admin Discogs Discover​

POST
/admin/canonical/enrich/discogs-discover

Barcode auto-link: attach Discogs releases to UPC-bearing albums.

MusicBrainz-style network drain (Discogs paces to ~1 req/s). drain
walks the whole backlog. Poll /admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
200
drain
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Admin Discogs Reproject​

POST
/admin/canonical/enrich/discogs-reproject

Re-project Discogs-linked albums + artists from already-cached data.
No network — fast. drain walks the whole backlog. Poll
/admin/task-history/{task_id}.

Parameters​

Header Parameters

authorization
x-api-key

Query Parameters

limit
Type
integer
Default
1000
drain
Type
boolean
Default
false

Responses​

Successful Response

application/json
JSON
{
  
"additionalProperties": "string"
}

Playground​

Headers
Variables
Key
Value

Samples​


Media — Blue Sapphire Software.