< Back
Print

Controlling Connector Jobs via the REST API

(Available since version 1.18.0)

All connectors provide a REST API, that enables controlling the exports via HTTP calls. These are the following methods.

A) Starting and Monitoring Exports

This method can be used for exports of any size and is the generally recommended one.

1) Start the job and store the process ID from the response.

POST https://contentserv-system.com/admin/app/scapi/jobs/{jobId}/start

If it is intended to only start the export, the following steps can be ignored.

2) Monitor the status.

While the SyncState equals 2, this means the job is still running. We recommend waiting 2 seconds and then calling the status again.

GET https://contentserv-system.com/admin/app/scapi/jobs/{jobId}/status/{processId}

Status Status Number
Success 1
Running 2
Error 3

3) Download the result files.

GET https://contentserv-system.com/admin/app/scapi/jobs/{jobId}/download/{processId}

The download call streams the export file. If the job only has one export file, then this one is returned (e.g. export.xlsx). If the job has two or more result files or even sub-folders with result files, a ZIP file is returned (example: export.zip).

B) Starting an Export and Wait for the Result Files

This method waits for the export to finish and directly downloads the result files in binary. It is only recommended for smaller exports, because it cancels the call if the job takes longer than an hour.

Call the datafeed URL with the external key of the job.

GET https://contentserv-system.com/admin/app/scapi/datafeed/synchron/{jobExternalKey}/

If the job only has one export file, then this one is returned (e.g. export.xlsx). If the job has two or more result files or even sub-folders with result files, a ZIP file is returned (example: export.zip).

You can find the external key here:

Was this article helpful?
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents