v4

latestOpenAPI 3.1.02026-07-31121440441.0 KB
aiTaskBuilder

Sync a Batch

Triggers an asynchronous sync job that materialises tasks for any datapoints appended to the batch's attached dataset since it was set up (or since the last sync). Returns immediately with a sync_id; the work is performed by a background worker.

The batch must be in READY status and have an attached dataset. Syncs for the same batch are serialised, so a new sync picks up wherever the previous one left off.

Poll GET /batches/{batch_id}/syncs/{sync_id} until the returned job reaches a terminal status (complete or failed).

post/api/v1/data-collection/batches/{batch_id}/sync

Path parameters

batch_idstring uuid required

The unique identifier of the batch to sync

Headers

Authorizationstring required

The Prolific API uses API token to authenticate requests. You can create an API token directly from your settings.

Your API token does not have an expiry date and carries full permission, so be sure to keep them secure.

If your token is leaked, delete it and create a new one directly in the app.

In your requests add Authorization header with the value Token <your token>.

Response

Sync job accepted and queued. The returned job has status queued; poll the sync-status endpoint for progress.

batch_idstring uuid required

The batch this sync job belongs to.

dataset_idstring uuid required

The dataset whose appended datapoints are being synced.

sync_idstring uuid required

The unique identifier of the sync job.

created_atstring date-time required

When the sync job was created (ISO 8601, UTC).

updated_atstring date-time required

When the sync job was last updated (ISO 8601, UTC).

status'queued' | 'processing' | 'complete' | 'failed' required

Current status of the sync job.

tasks_createdinteger

Number of tasks created this sync. Present when status is complete.

datapoints_processedinteger

Number of datapoints processed this sync. Present when status is complete.

groups_createdinteger

Number of new task groups created this sync. Present when status is complete.

groups_expandedinteger

Number of existing task groups grown this sync. Non-zero only for predetermined-grouping batches; always 0 for tasks-per-group batches. Present when status is complete.

reasonstring

Human-readable reason for failure. Present when status is failed.