Sync Runs

A SyncRun represents a single execution (run) of a Sync job. It tracks status, statistics, logs, and timing for each sync operation.

List Sync Runs

Endpoint

GET/sync_runs

Return Object

SyncRun[]

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Request Parameters

ParameterDescription
user_id
int64
User ID. Provide a value of 0 to operate the current session's user.

Additional Arguments

Example Request

curl "https://app.files.com/api/rest/v1/sync_runs.json?user_id=1" \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

[
  {
    "id": 1,
    "body": "example",
    "bytes_synced": 1,
    "compared_files": 1,
    "compared_folders": 1,
    "completed_at": "2000-01-01T01:00:00Z",
    "created_at": "2000-01-01T01:00:00Z",
    "dest_remote_server_type": "example",
    "dry_run": true,
    "errored_files": 1,
    "estimated_bytes_count": 1,
    "event_errors": [
      "example"
    ],
    "log_url": "https://www.example.com/log_file.txt",
    "runtime": 1.0,
    "site_id": 1,
    "workspace_id": 1,
    "src_remote_server_type": "example",
    "status": "example",
    "successful_files": 1,
    "sync_id": 1,
    "sync_name": "Azure to SharePoint Sync",
    "updated_at": "2000-01-01T01:00:00Z",
    "live_transfers": [
      {
        "path": "example",
        "status": "example",
        "bytes_copied": 1,
        "bytes_total": 1,
        "percentage": 1.0,
        "eta": "example",
        "started_at": "example"
      }
    ]
  }
]

Show Sync Run

Endpoint

GET/sync_runs/{id}

Return Object

SyncRun

Authorization Requirement

Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.

Request Parameters

ParameterDescription
id
int64
Required
Sync Run ID.

Example Request

curl https://app.files.com/api/rest/v1/sync_runs/{id}.json \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "body": "example",
  "bytes_synced": 1,
  "compared_files": 1,
  "compared_folders": 1,
  "completed_at": "2000-01-01T01:00:00Z",
  "created_at": "2000-01-01T01:00:00Z",
  "dest_remote_server_type": "example",
  "dry_run": true,
  "errored_files": 1,
  "estimated_bytes_count": 1,
  "event_errors": [
    "example"
  ],
  "log_url": "https://www.example.com/log_file.txt",
  "runtime": 1.0,
  "site_id": 1,
  "workspace_id": 1,
  "src_remote_server_type": "example",
  "status": "example",
  "successful_files": 1,
  "sync_id": 1,
  "sync_name": "Azure to SharePoint Sync",
  "updated_at": "2000-01-01T01:00:00Z",
  "live_transfers": [
    {
      "path": "example",
      "status": "example",
      "bytes_copied": 1,
      "bytes_total": 1,
      "percentage": 1.0,
      "eta": "example",
      "started_at": "example"
    }
  ]
}

The SyncRun Object

Some of the endpoints above return a SyncRun object. The attributes of this object are listed below.

AttributeDescription
id
int64
SyncRun ID
body
string
Log or summary body for this run
bytes_synced
int64
Total bytes synced in this run
compared_files
int64
Number of files compared
compared_folders
int64
Number of folders compared
completed_at
date-time
When this run was completed
created_at
date-time
When this run was created
dest_remote_server_type
string
Destination remote server type, if any
Possible values: ftp, sftp, s3, google_cloud_storage, webdav, wasabi, backblaze_b2, one_drive, box, dropbox, google_drive, azure, sharepoint, s3_compatible, azure_files, files_agent, filebase, cloudflare, linode, files_com
dry_run
boolean
Whether this run was a dry run (no actual changes made)
errored_files
int64
Number of files that errored
estimated_bytes_count
int64
Estimated bytes count for this run
event_errors
array(string)
Array of errors encountered during the run
log_url
string
Link to external log file.
runtime
double
Total runtime in seconds
site_id
int64
Site ID
workspace_id
int64
Workspace ID
src_remote_server_type
string
Source remote server type, if any
Possible values: ftp, sftp, s3, google_cloud_storage, webdav, wasabi, backblaze_b2, one_drive, box, dropbox, google_drive, azure, sharepoint, s3_compatible, azure_files, files_agent, filebase, cloudflare, linode, files_com
status
string
Status of the sync run (success, failure, partial_failure, in_progress, skipped)
Possible values: success, failure, partial_failure, in_progress, skipped
successful_files
int64
Number of files successfully synced
sync_id
int64
ID of the Sync this run belongs to
sync_name
string
Name of the Sync this run belongs to
updated_at
date-time
When this run was last updated
live_transfers
array(object)
Array of in-progress file transfers with progress data. Only present when the sync run status is in_progress.

Example SyncRun Object

{
  "id": 1,
  "body": "example",
  "bytes_synced": 1,
  "compared_files": 1,
  "compared_folders": 1,
  "completed_at": "2000-01-01T01:00:00Z",
  "created_at": "2000-01-01T01:00:00Z",
  "dest_remote_server_type": "example",
  "dry_run": true,
  "errored_files": 1,
  "estimated_bytes_count": 1,
  "event_errors": [
    "example"
  ],
  "log_url": "https://www.example.com/log_file.txt",
  "runtime": 1.0,
  "site_id": 1,
  "workspace_id": 1,
  "src_remote_server_type": "example",
  "status": "example",
  "successful_files": 1,
  "sync_id": 1,
  "sync_name": "Azure to SharePoint Sync",
  "updated_at": "2000-01-01T01:00:00Z",
  "live_transfers": [
    {
      "path": "example",
      "status": "example",
      "bytes_copied": 1,
      "bytes_total": 1,
      "percentage": 1.0,
      "eta": "example",
      "started_at": "example"
    }
  ]
}