Browse the docs

API reference

Spine

The identity spine (P6-16, ADR-011): what the open world knows a film, a show, an artist, an album or a book to be, from Wikidata (CC0), loaded as a pack and asked before any catalogue so a known title is fetched by id and never searched.

Paths are relative to /api/v1 on your server.

GET/spine#

What pack is loaded

The pack’s version, source, licence, when it was built and imported, and how many works it holds; loaded: false and pack: null until one is. settings:manage.

Authorisation
Bearer token or API key · Session cookie
  • 200Success. application/json · object
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks settings:manage, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
POST/spine#

Load a spine pack

The pack itself as the body, gzipped (application/gzip) or plain newline-delimited JSON (application/x-ndjson): a header line, then one work per line. Replaces what is loaded in one transaction. settings:manage.

Authorisation
Bearer token or API key · Session cookie
Body
application/gzip ·
  • 200Success. application/json · object
  • 400VALIDATION_FAILED: the request did not match the schema; details.issues lists what. SPINE_PACK_INVALID: not a spine pack, a header this server does not read, or a line it cannot; the line is named application/json · ErrorEnvelope
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks settings:manage, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope
  • 409SPINE_PACK_STALE: older than the pack already loaded application/json · ErrorEnvelope
GET/spine/search#

The works a title could be

Scored by the matching formula on the title and the year, best first, each with every id the world files it under. item:edit.

Authorisation
Bearer token or API key · Session cookie
ParameterInTypeDescription
type requiredquery"movie" | "show" | "artist" | "album" | "book"
title requiredquerystring
byquerystring
yearqueryinteger
  • 200Success. application/json · object
  • 400VALIDATION_FAILED: the request did not match the schema; details.issues lists what. application/json · ErrorEnvelope
  • 401UNAUTHENTICATED: no session, or the access token expired. application/json · ErrorEnvelope
  • 403FORBIDDEN: the account lacks item:edit, or the library, label, age or schedule scope refuses it. application/json · ErrorEnvelope