Pipelines
Pipelines represent the data flows within a connection, defining how data is collected, transformed, and delivered — for example, by ingesting users, exporting profiles, or routing events.
This section documents the endpoints common to various types of pipelines. Instead, to create, update, or retrieve a pipeline, refer to the specific sections for each pipeline type.
Set status
Sets the status of a pipeline.
Request
-
:id
int RequiredThe ID of the pipeline.
-
enabled
boolean RequiredIndicates if the pipeline is enabled.
Response
No response.curl -X PUT https://example.com/v1/pipelines/705981339/status \ -H "Authorization: Bearer api_xxxxxxx" \ --json '{ "enabled": true }' Set schedule period
Sets the frequency at which a pipeline imports users or export profiles. The pipeline must be enabled for the run to be scheduled. If the period is null, the scheduler will be disabled.
Request
-
:id
int RequiredThe ID of the pipeline.
-
period
nullable string RequiredThe schedule period. It determines how often the run is triggered automatically. If it is null, the scheduler is disabled and no automatic runs will occur.
Possible values:"5m","15m","30m","1h","2h","3h","6h","8h","12h"or"24h".
Response
No response.curl -X PUT https://example.com/v1/pipelines/705981339/schedule \ -H "Authorization: Bearer api_xxxxxxx" \ --json '{ "period": "1h" }' Run pipeline
Starts a pipeline run to import users into the data warehouse or export warehouse profiles for activation. A run applies the pipeline's filters and transformations.
It returns immediately without waiting for the run to complete. To track the progress, call the Get pipeline run endpoint using the returned run ID.
The pipeline must be enabled.
Request
-
:id
int RequiredThe ID of the pipeline that imports users or exports profiles.
-
incremental
nullable booleanDetermines whether users should be imported from scratch (
false) or incrementally from the previous import (true). If omitted or nil, the pipeline's default setting will be used.For source database and file pipelines, the pipeline must include a "update time" property.
For destination pipelines, this parameter must be omitted or set to nil.
Response
-
id
intThe ID of the run that was started.
curl https://example.com/v1/pipelines/705981339/runs \ -H "Authorization: Bearer api_xxxxxxx" \ --json '{ "incremental": true }' {
"id": 609461413
}List pipeline runs
Returns all pipeline runs.
Pipeline runs are automatically triggered by the scheduler or can be started by calling the specific endpoint for the pipeline.
Request
No parameters.Response
-
runs
array of objectThe pipeline runs.
-
id
intThe ID of the run.
-
pipeline
intThe ID of the pipeline that was run.
-
startTime
datetimeThe start time in ISO 8601 format.
-
endTime
nullable datetimeThe end time in ISO 8601 format. It is null if the run has not yet finished.
-
passed
array of intThe number of users or events that successfully passed each step. All values will be 0 if the run has not yet finished.
-
failed
array of intThe number of users or events that failed at each step. All values will be 0 if the run has not yet finished.
-
error
stringAn error occurred during the run, causing it to stop prematurely. It is empty if the run has not yet finished or if no error occurred.
-
curl https://example.com/v1/pipelines/runs \ -H "Authorization: Bearer api_xxxxxxx" {
"runs": [
{
"id": 609461413,
"pipeline": 705981339,
"startTime": "2024-11-27T18:22:47.937Z",
"endTime": "2024-11-27T18:49:07.150Z",
"passed": [
6029,
6029,
5974,
5974,
5974,
5974
],
"failed": [
0,
0,
55,
0,
0,
0
],
"error": ""
}
]
}Get pipeline run
Returns a pipeline run.
Pipeline runs are automatically triggered by the scheduler or can be started by calling the specific endpoint for the pipeline.
Request
-
:id
int RequiredThe ID of the run.
Response
-
id
intThe ID of the run.
-
pipeline
intThe ID of the pipeline that was run.
-
startTime
datetimeThe start time in ISO 8601 format.
-
endTime
nullable datetimeThe end time in ISO 8601 format. It is null if the run has not yet finished.
-
passed
array of intThe number of users or events that successfully passed each step. All values will be 0 if the run has not yet finished.
-
failed
array of intThe number of users or events that failed at each step. All values will be 0 if the run has not yet finished.
-
error
stringAn error occurred during the run, causing it to stop prematurely. It is empty if the run has not yet finished or if no error occurred.
curl https://example.com/v1/pipelines/runs/609461413 \ -H "Authorization: Bearer api_xxxxxxx" {
"id": 609461413,
"pipeline": 705981339,
"startTime": "2024-11-27T18:22:47.937Z",
"endTime": "2024-11-27T18:49:07.150Z",
"passed": [
6029,
6029,
5974,
5974,
5974,
5974
],
"failed": [
0,
0,
55,
0,
0,
0
],
"error": ""
}Delete pipeline
Delete a pipeline.
Request
-
:id
int RequiredThe ID of the pipeline to delete.
Response
No response.curl -X DELETE https://example.com/v1/pipelines/705981339 \ -H "Authorization: Bearer api_xxxxxxx"