API reference
Backup
Backups, restore and personal data export (P3-18).
Paths are relative to /api/v1 on your server.
/backup#List backups
- Authorisation
- Bearer token or API key · Session cookie
- 200Success.
application/json·object - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackssettings:manage, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
/backup#Make a backup
- Authorisation
- Bearer token or API key · Session cookie
- Body
application/json·object
- 201Success.
application/json·BackupRecord - 400
VALIDATION_FAILED: the request did not match the schema;details.issueslists what.application/json·ErrorEnvelope - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackssettings:manage, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
/backup/{id}#Delete a backup
- Authorisation
- Bearer token or API key · Session cookie
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string |
- 204Done; no body.
- 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackssettings:manage, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope - 404
NOT_FOUND: no such thing, or not one the caller may see.application/json·ErrorEnvelope
/backup/{id}/download#Download a backup
- Authorisation
- Bearer token or API key · Session cookie
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string |
- 200Success.
application/zstd· - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackssettings:manage, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope - 404
NOT_FOUND: no such thing, or not one the caller may see.application/json·ErrorEnvelope
/backup/offsite#Off-site backups: how they stand
Plus (P6-22). Whether this server can send its backups off-site — claimed by a Collectoh account with Plus — whether each scheduled backup goes, whether a passphrase is set, and how the last send went.
- Authorisation
- Bearer token or API key · Session cookie
- 200Success.
application/json·OffsiteStatus - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackssettings:manage, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
/backup/offsite#Send each scheduled backup off-site, or stop
- Authorisation
- Bearer token or API key · Session cookie
- Body
application/json·object
- 200Success.
application/json·OffsiteStatus - 400
VALIDATION_FAILED: the request did not match the schema;details.issueslists what.application/json·ErrorEnvelope - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 402
PLUS_REQUIRED: The account has no Plus.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackssettings:manage, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope - 409
CONFLICT: Switched on before this server is claimed by a Collectoh account (details.reasonisclaim), or before a passphrase is chosen (passphrase).application/json·ErrorEnvelope
/backup/offsite/backups#The account’s off-site backups
From every server the account has had, newest first: what a new install restores from.
- Authorisation
- Bearer token or API key · Session cookie
- 200Success.
application/json·object - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackssettings:manage, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
/backup/offsite/backups/{id}/restore#Restore an off-site backup
Fetched, opened with the passphrase and checked as a backup on this disk is, then restored unless dryRun. This install keeps its own claim, and the key the passphrase made, so later backups go off-site as before.
- Authorisation
- Bearer token or API key · Session cookie
- Body
application/json·object
| Parameter | In | Type | Description |
|---|---|---|---|
id required | path | string |
- 200Success.
application/json·RestoreReport - 400
VALIDATION_FAILED: the request did not match the schema;details.issueslists what.VALIDATION_FAILED: The passphrase does not open it (details.reasonispassphrase), or it has been damaged (damaged), cut short (truncated) or is not one (format).application/json·ErrorEnvelope - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackssettings:manage, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope - 404
NOT_FOUND: no such thing, or not one the caller may see.application/json·ErrorEnvelope
/backup/offsite/passphrase#Choose the off-site passphrase
The key it makes (scrypt) seals every backup sent off-site. The key is kept here, sealed with SECRET_KEY; the passphrase is kept nowhere and never sent. Backups sealed under an earlier passphrase still need that one.
- Authorisation
- Bearer token or API key · Session cookie
- Body
application/json·object
- 200Success.
application/json·OffsiteStatus - 400
VALIDATION_FAILED: the request did not match the schema;details.issueslists what.application/json·ErrorEnvelope - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackssettings:manage, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
/backup/offsite/send#Send a backup off-site now
The database and its settings — never media, never artwork — sealed here and kept on collectoh.com for 30 days.
- Authorisation
- Bearer token or API key · Session cookie
- 201Success.
application/json·OffsiteSent - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 402
PLUS_REQUIRED: The account has no Plus, or Plus covers three other servers.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackssettings:manage, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope - 409
CONFLICT: This server is not claimed, or no passphrase is chosen.application/json·ErrorEnvelope
/export#Export my data
What the account owns — history, notes, playlists — as a JSON download.
- Authorisation
- Bearer token or API key · Session cookie
| Parameter | In | Type | Description |
|---|---|---|---|
scope | query | "history" | "progress" | "playlists" | "notes" | "metadata" |
- 200Success.
application/json· - 400
VALIDATION_FAILED: the request did not match the schema;details.issueslists what.application/json·ErrorEnvelope - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackslibrary:view, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
/restore#Restore a backup
dryRun reports what would happen without touching anything.
- Authorisation
- Bearer token or API key · Session cookie
- Body
application/json·object
- 200Success.
application/json·RestoreReport - 400
VALIDATION_FAILED: the request did not match the schema;details.issueslists what.application/json·ErrorEnvelope - 401
UNAUTHENTICATED: no session, or the access token expired.application/json·ErrorEnvelope - 403
FORBIDDEN: the account lackssettings:manage, or the library, label, age or schedule scope refuses it.application/json·ErrorEnvelope
No endpoint here matches. Try another word, or look in another area.