Sync

Sync file status

Compare local files against the project's committed state. Send each local path with its SHA-256 as `sha256`. The server returns one status row per file — it does not return bucketed path arrays. Set `includeRemoteOnly` on the last batch to also receive files you don't have locally. Omit `branch` to sync against main.

POST/api/v1/projects/{projectId}/sync

Request

Body
json
{
  "files": [
    { "path": "Content/Maps/MainLevel.umap", "sha256": "a1b2c3..." },
    { "path": "Content/Characters/Hero.uasset", "sha256": "d4e5f6..." }
  ],
  "includeRemoteOnly": true,
  "branch": "main"
}

Response

200 OK
json
{
  "files": [
    {
      "path": "Content/Maps/MainLevel.umap",
      "status": "modified",
      "fileId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "remoteVersion": 11,
      "remoteSha256": "9f8e7d...",
      "remoteCommitSeq": 24,
      "remoteSize": 524288000
    },
    {
      "path": "Content/Characters/Hero.uasset",
      "status": "up_to_date",
      "fileId": "2c4a1e88-1f3b-4a90-8c77-6b1d0e5a3f21",
      "remoteVersion": 3,
      "remoteSha256": "d4e5f6...",
      "remoteCommitSeq": 19,
      "remoteSize": 10485760
    }
  ],
  "latestCommitSeq": 24
}

Examples

curlbash
curl -X POST https://usourcecontrol.com/api/v1/projects/7c9e6679-7425-40de-944b-e07fc1f90ae7/sync \
  -H "Authorization: Bearer usc_your_project_key" \
  -H "Content-Type: application/json" \
  -d '{
    "files": [
      { "path": "Content/Maps/MainLevel.umap", "sha256": "a1b2c3..." },
      { "path": "Content/Characters/Hero.uasset", "sha256": "d4e5f6..." }
    ],
    "includeRemoteOnly": true
  }'

Try it

Try itChanges data
POST/api/v1/projects/{projectId}/sync

Kept in this tab only, sent straight to the API, and never to our servers. Create one in your project’s settings.

This is a POST request against the live API. It will really run, on the real project the key belongs to.

Was this helpful?

Back to top