Sync
Desktop apps and plugins keep a local copy of the user’s library. Instead of downloading the whole library again, they ask what changed.
- First sync. Get the current cursor with
GET /v1/me/library/changes?latest=trueand keep it. Then readGET /v1/me/librarypage by page and download what you need. - Later. Call
GET /v1/me/library/changes?cursor=<saved>. Apply the changes, savenext_cursor, and repeat whilehas_moreis true.
{ "object": "list", "data": [ { "object": "change", "seq": 1042, "entity": "entitlement", "id": "ent_01M9…", "op": "upsert", "data": { "target_type": "pack", "target_id": "pck_01M8…" }, "at": "2026-12-04T10:00:00Z" }, { "object": "change", "seq": 1043, "entity": "pack", "id": "pck_01M8…", "op": "upsert", "data": {}, "at": "…" }, { "object": "change", "seq": 1044, "entity": "favorite", "id": "asset:ast_01M8…", "op": "delete", "data": { "target_type": "asset", "target_id": "ast_01M8…" }, "at": "…" } ], "has_more": false, "next_cursor": "1044"}entity |
What to do |
|---|---|
entitlement |
the user got something, or lost it (GET /v1/me/library?include_revoked=true shows the status). Download or remove it |
pack |
a pack the user holds changed its contents. Ask for its manifest (POST /v1/downloads) and compare paths and sha256 with your copy |
favorite |
op: delete is a tombstone: the favorite was removed |
collection, collection_item |
a collection or one of its items was created, changed or deleted |
Several changes of one entity in a page come as one, the latest. Changes are kept at least 90 days; a client that was offline longer should do a first sync again.
The samplecloud command-line client
Section titled “The samplecloud command-line client”The command-line client implements this flow: samplecloud sync ~/Samples.