Method: SyncClient#upload_sync_file

Defined in:
lib/lockstep_sdk/clients/sync_client.rb

#upload_sync_file(app_enrollment_id:, is_full_sync:, filename:) ⇒ Object

Requests a new Sync task from a ZIP file you provide. This ZIP file can contain one or more files with data from the customer’s platform. Individual files can be in the format CSV or JSONL (JSON with Lines).

A Sync task represents an action performed by an Application for a particular account. An Application can provide many different tasks as part of their capabilities. Sync tasks are executed in the background and will continue running after they are created. Use one of the creation APIs to request execution of a task. To check on the progress of the task, call GetSync or QuerySync.

Parameters:

  • app_enrollment_id (uuid)

    The optional existing app enrollment to associate with the data in the zip file.

  • is_full_sync (boolean)

    True if this is a full sync, false if this is a partial sync. Defaults to false.

  • filename (File)

    The full path of a file to upload to the API



59
60
61
62
63
# File 'lib/lockstep_sdk/clients/sync_client.rb', line 59

def upload_sync_file(app_enrollment_id:, is_full_sync:, filename:)
    path = "/api/v1/Sync/zip"
    params = {:appEnrollmentId => app_enrollment_id, :isFullSync => is_full_sync}
    @connection.request(:post, path, nil, params)
end