Browse the docs

API reference

Collectoh account

Which Collectoh account this server belongs to (P6-19, docs/14 §5), claimed the way a television signs in: the server shows a short code and its owner confirms it on collectoh.com. The first-run wizard does it under /setup/claim, open while there is no owner; afterwards /claim takes settings:manage. Only the owner has an account; everyone they invite signs in to this server alone.

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

GET/claim#

Which account the server belongs to

With when it was claimed and last checked in. released when the account let it go, or another computer replaced it.

Authorisation
Bearer token or API key · Session cookie
  • 200Success. application/json · ClaimStatus
  • 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/claim#

Ask for a code to claim the server again

As at setup, for a server that was released, or is to belong to another account.

Authorisation
Bearer token or API key · Session cookie
  • 200Success. application/json · ClaimStatus
  • 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
  • 429PROVIDER_RATE_LIMITED: Collectoh accounts has had too many codes asked for from this network lately. application/json · ErrorEnvelope
  • 502PROVIDER_UNAVAILABLE: Collectoh accounts cannot be reached from this server. application/json · ErrorEnvelope
POST/claim/poll#

See whether the code was confirmed

Authorisation
Bearer token or API key · Session cookie
  • 200Success. application/json · ClaimStatus
  • 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
GET/setup/claim#

Whether the server is claimed yet

For the first-run wizard, open while the server has no owner. required says whether setup waits for a claim before it finishes (SETUP_CLAIM_REQUIRED).

Authorisation
None
  • 200Success. application/json · ClaimStatus
  • 409SETUP_ALREADY_COMPLETE: The server has an owner: its account is under /claim. application/json · ErrorEnvelope
POST/setup/claim#

Ask for a code to claim the server with

The account service gives a short code for the owner to confirm on collectoh.com, good for a quarter of an hour; asking again while one waits gives the same one. The server tells the service its name, platform and version, and nothing else.

Authorisation
None
  • 200Success. application/json · ClaimStatus
  • 409SETUP_ALREADY_COMPLETE: The server has an owner: its account is under /claim. application/json · ErrorEnvelope
  • 429PROVIDER_RATE_LIMITED: Collectoh accounts has had too many codes asked for from this network lately. application/json · ErrorEnvelope
  • 502PROVIDER_UNAVAILABLE: Collectoh accounts cannot be reached from this server. application/json · ErrorEnvelope
POST/setup/claim/poll#

See whether the code was confirmed

Asked every waiting.interval seconds. claimed once the owner has confirmed the code; unclaimed again when it expired unconfirmed.

Authorisation
None
  • 200Success. application/json · ClaimStatus
  • 409SETUP_ALREADY_COMPLETE: The server has an owner: its account is under /claim. application/json · ErrorEnvelope