Data Management

Get Sync Job Status

Changed on

Get the status of a sync job by ID.

get/syncs/{id}

Request

  • Base URL
    https://api.withterminal.com/tsp/v1
  • URL
    https://api.withterminal.com/tsp/v1/syncs/{id}
  • Auth
    HTTP bearer

Query parameters

expand'issues'

Expand related resources in the response to reduce requests.

Headers

X-Application-Idstring

Scopes the request to a Terminal application in the caller's organization. Required for multi-application organizations when using a user session or OAuth access token. API keys are already bound to a single application.

Connection-Tokenstring required
Example:con_tkn_22vUhkC6tgre4kwaYfUkCDA1rzn6eyb4

The token returned when a user authenticated their account. This authorizes access to a specific account.

Response

OK

idstring ulid required
status'requested' | 'in_progress' | 'completed' | 'failed' required

The status of the sync

failureReasonstring

If the sync failed, this will contain the reason

progressnumber

Percentage value between 0 and 100, rounded to 2 decimal places.

startFromstring date-time
requestedAtstring date-time required
completedAtstring date-time
attemptsnumber
providerRequestsSyncProviderRequestType[]

Provider requests attached to this sync. When non-empty, the sync is waiting on an out-of-band step on the provider's side (e.g. the provider manually delivering historical files, or credentials being provisioned) and may legitimately stay in progress for an extended period.

Example response

{
  "id": "sync_01GV12VR4DJP70GD1ZBK0SDWFH",
  "status": "completed",
  "failureReason": "Reason for failure if sync status is 'failed'",
  "progress": 85,
  "issues": [
    "isu_01D8ZQFGHVJ858NBF2Q7DV9MNC"
  ],
  "startFrom": "2021-01-06T03:24:53.000Z",
  "requestedAt": "2021-01-06T03:24:53.000Z",
  "completedAt": "2021-01-06T03:24:53.000Z",
  "attempts": 1,
  "providerRequests": [
    "historical_files"
  ]
}

Changes

    • breaking

      added to the / response property oneOf list for the response status

    • warning

      added the new provider_timeout enum value to the response property for the response status

    • info

      added the non-success response with the status

    • info

      removed subschema #2 from the / response property oneOf list for the response status