Process
Trigger import and export processes on a site using the Platform API.
4 min read
The process endpoint lets you control when data flows in and out of the platform. It supports triggering jobs in the following combinations:
- Import: import data from all data sources into a site.
- Export: export data to one or all configured channels.
- Combined: run an import followed consecutively by exports to all channels.
This endpoint supports unified authentication.
Site and process relationship
- Each site can have only one process running at a time. One additional process can be queued per site.
- Processes operate directly on sites, not on Streams.
Data import from Streams to sites
- You can set up a site to receive data from a Stream via a data source.
- When you trigger a data import on a site linked to a Stream, the process includes all data uploaded to the Stream before the process started.
- Data uploaded to the Stream after the process starts is not included in the current run. It is processed in the next scheduled run.
Post
Trigger a processing action on a site.
curl --location --request POST 'https://platform-api.productsup.io/platform/v2/process/<siteId>' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: accountId:yourToken' \
--data-raw '{"action": "import"}'{
"success": true,
"process_id": "<uuid-32-formatted-string>"
}POST https://platform-api.productsup.io/platform/v2/process/<siteId>
URL parameters
| Field | Type | Description |
|---|---|---|
siteId | integer | Site to trigger processing for |
HTTP headers
| Name | Value |
|---|---|
Content-Type | application/json |
Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
action | string | Yes | See action values |
id | integer | No | Export or channel ID. Required only for export and channel action types. |
Action values
| Value | Description |
|---|---|
import | Trigger an import on the site |
export | Trigger an export. Requires an export ID. |
channel | Trigger a channel export. Requires a channel ID. |
export-all | Trigger all exports and channels |
all | Trigger an import, then all exports and channels |
Response body fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates whether the job was successfully scheduled |
process_id | string | Process identifier (UUID 32 format, returned on success) |
message | string | Failure reason, returned when success is false |
Response status codes
| Code | Message | Details |
|---|---|---|
| 200 | — | The process was successfully called or scheduled |
| 429 | Too many attempts | The API is rate-limiting your request. See rate limiting. |
| 429 | Cannot trigger a new process, a process is already in the current queue | The job queue for this site already contains a queued job. Wait for it to start before retrying. |
| 500 | Could not trigger job because a lock is already acquired | A previous request for this site holds a lock. The lock releases once that request returns a response. |
| 500 | Error occurred while interacting with the job server | An infrastructure issue occurred. One retry is reasonable. Continuous retries worsen the problem. |
How is this guide?