Sync Logs

A SyncLog is an audit log for monitoring and troubleshooting operations made by Remote Server Sync.

Logs available through this endpoint are retained for 6 months, after which they are automatically discarded. For longer retention, use Files.com SIEM integrations to stream logs in real time to your preferred SIEM, or configure SIEM streaming to a file.

List Sync Logs

SDK Function

SyncLog.list()

Return Object

ListIterator<SyncLog>

Authorization Requirement

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

Additional Arguments

Example Request

import com.files.ListIterator;
import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.SyncLog;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  ListIterator<SyncLog> syncLogs = SyncLog.list(parameters);
  for (SyncLog syncLog : syncLogs.listAutoPaging()) {
    // Operate on syncLog
  }
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

The SyncLog Object

Some of the functions above return a SyncLog object. The attributes of this object are listed below.

AttributeDescription
timestamp
date-time
Start Time of Action. Deprecrated: Use created_at.
sync_id
int64
Sync ID
external_event_id
int64
External Event ID used by legacy syncs
sync_run_id
int64
Sync Run ID
error_type
string
Error type, if applicable
message
string
Message
operation
string
Operation type
Possible values: delete, delete_source, list, mkdir, sync, sync_overwrite, write_trigger_file
path
string
File path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
size
int64
File size
file_type
string
File type
status
string
Status
Possible values: success, failure, partial_failure, skipped, retried_failure
created_at
date-time
Start Time of Action