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

SDK Method

\Files\Model\SyncRun::list;

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.

Method Arguments

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

Additional Arguments

Example Request

try {
  $sync_runs = \Files\Model\SyncRun::list([
    'user_id' => 1
  ]);
  foreach ($sync_runs as $sync_run) {
    // Operate on $sync_run
  }
} catch (\Files\NotAuthenticated\InvalidUsernameOrPasswordException $e) {
  echo 'Authentication Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
} catch (\Files\FilesException $e) {
  echo 'Unknown Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
}

Show Sync Run

SDK Method

\Files\Model\SyncRun::find;

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.

Method Arguments

ArgumentDescription
id
int64
Required
Sync Run ID.

Example Request

try {
  $sync_run = \Files\Model\SyncRun::find($id);
  // Operate on $sync_run
} catch (\Files\NotAuthenticated\InvalidUsernameOrPasswordException $e) {
  echo 'Authentication Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
} catch (\Files\FilesException $e) {
  echo 'Unknown Error Occurred (' . get_class($e) . '): ', $e->getMessage(), "\n";
}

The SyncRun Object

Some of the methods 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.