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

SyncRun.List();

Return Object

FilesList<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

using FilesCom.Models;

var parameters = new Dictionary<string, object>();
parameters.Add("user_id", (Int64?) 1);

try
{
    var syncRunIterator = SyncRun.List(parameters);
    foreach (SyncRun syncRun in syncRunIterator.ListAutoPaging()) {
        // Operate on syncRun
    }
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

Show Sync Run

SDK Method

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

using FilesCom.Models;

try
{
    var syncRun = await SyncRun.Find(id);
    // Operate on syncRun
}
catch (FilesCom.NotAuthenticatedException e)
{
    Console.WriteLine($"Authentication Error Occurred ({e.GetType().Name}): " + e.Message);
}
catch (FilesCom.SdkException e)
{
    Console.WriteLine($"Unknown Error Occurred ({e.GetType().Name}): " + e.Message);
}

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.