Import events
This type of pipeline imports events into the workspace's data warehouse received from websites, mobile apps, backend systems, and connected devices. It is available only for source SDK and webhook connections.
Create pipeline
Create a source pipeline that imports events into the data warehouse.
Request
-
name
string RequiredThe pipeline's name.
Must be a non-empty string with a maximum of 60 characters. -
connection
string RequiredThe ID of the connection from which the events are received. It must be an SDK or webhook connection.
-
target
string RequiredThe entity on which the pipeline operates, which must be
Possible values:"Event"in order to create a pipeline that imports events."Event". -
enabled
booleanIndicates if the pipeline is enabled once created. If disabled, the pipeline cannot run, and attempts to run it will fail.
If not specified, the default is
false, so the pipeline is created disabled. -
filter
nullable filterThe filter applied to the events. If it's not null, only the events that match the filter will be imported.
See the API filter documentation for more details.
Response
-
id
stringThe ID of the pipeline.
curl https://example.com/v1/pipelines \ -H "Authorization: Bearer api_xxxxxxx" \ --json '{ "name": "Collect track events", "connection": "4fr7Kp9ZaQ2m", "target": "Event", "enabled": true, "filter": { "operator": "and", "rules": [ { "property": "type", "operator": "is", "values": [ "track" ] } ] } }' {
"id": "7XcP4mZ9aQ2r"
}Update pipeline
Update a source pipeline that imports events into the data warehouse.
Request
-
:id
string RequiredThe ID of the source event pipeline.
-
name
string RequiredThe pipeline's name.
Must be a non-empty string with a maximum of 60 characters. -
enabled
booleanIndicates if the pipeline is enabled. Set to
falseto disable the pipeline. A disabled pipeline cannot run, and attempts to run it will fail.If not specified, the default is
false. Since the update replaces the entire pipeline, omitting this field disables an enabled pipeline.Use the Set status endpoint to change only the pipeline's status.
-
filter
nullable filterThe filter applied to the events. If it's not null, only the events that match the filter will be imported.
See the API filter documentation for more details.
Response
No response body.curl -X PUT https://example.com/v1/pipelines/7XcP4mZ9aQ2r \ -H "Authorization: Bearer api_xxxxxxx" \ --json '{ "name": "Collect track events", "enabled": true, "filter": { "operator": "and", "rules": [ { "property": "type", "operator": "is", "values": [ "track" ] } ] } }' Get pipeline
Get a source pipeline that imports events into the data warehouse.
Request
-
:id
string RequiredThe ID of the source event pipeline.
Response
-
id
stringThe ID of the source event pipeline.
-
name
stringThe pipeline's name.
It is not longer than 60 characters. -
connector
stringThe code of the connection's connector.
-
connectorType
stringThe type of the connection's connector. It is always
Possible values:"SDK"or"Webhook"when the pipeline imports events."Application","Database","FileStorage","MessageBroker","SDK"or"Webhook". -
connection
stringThe ID of the connection from which the events are received. It is a source SDK or webhook connection.
-
connectionRole
stringThe role of the pipeline's connection. It is always
Possible values:"Source"when the pipeline imports events."Source"or"Destination". -
target
stringThe entity on which the pipeline operates. It is always
Possible values:"Event"when the pipeline imports events."User"or"Event". -
enabled
booleanIndicates if the pipeline is enabled.
-
filter
nullable filterThe filter applied to the events. If it's not null, only the events that match the filter will be imported.
See the API filter documentation for more details.
-
inSchema
schemaThe input schema. When importing events, it is the event schema.
curl https://example.com/v1/pipelines/7XcP4mZ9aQ2r \ -H "Authorization: Bearer api_xxxxxxx" {
"id": "7XcP4mZ9aQ2r",
"name": "Collect track events",
"connector": "android",
"connectorType": "SDK",
"connection": "4fr7Kp9ZaQ2m",
"connectionRole": "Source",
"target": "Event",
"enabled": true,
"filter": {
"operator": "and",
"rules": [
{
"property": "type",
"operator": "is",
"values": [
"track"
]
}
]
},
"inSchema": {
"kind": "object",
"properties": [
{
"name": "connectionId",
"type": {
"kind": "string"
},
"displayName": "Connection ID"
},
{
"name": "anonymousId",
"type": {
"kind": "string"
},
"displayName": "Anonymous ID"
},
{
"name": "channel",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Channel"
},
{
"name": "category",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Category"
},
{
"name": "context",
"type": {
"kind": "object",
"properties": [
{
"name": "app",
"type": {
"kind": "object",
"properties": [
{
"name": "name",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Name"
},
{
"name": "version",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Version"
},
{
"name": "build",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Build"
},
{
"name": "namespace",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Namespace"
}
]
},
"readOptional": true,
"displayName": "App"
},
{
"name": "browser",
"type": {
"kind": "object",
"properties": [
{
"name": "name",
"type": {
"kind": "string",
"values": [
"Chrome",
"Safari",
"Edge",
"Firefox",
"Samsung Internet",
"Opera",
"Other"
]
},
"readOptional": true,
"displayName": "Name"
},
{
"name": "other",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Other"
},
{
"name": "version",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Version"
}
]
},
"readOptional": true,
"displayName": "Browser"
},
{
"name": "campaign",
"type": {
"kind": "object",
"properties": [
{
"name": "name",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Name"
},
{
"name": "source",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Source"
},
{
"name": "medium",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Medium"
},
{
"name": "term",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Term"
},
{
"name": "content",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Content"
}
]
},
"readOptional": true,
"displayName": "Campaign"
},
{
"name": "consents",
"type": {
"kind": "map",
"elementType": {
"kind": "boolean"
}
},
"readOptional": true,
"displayName": "Consents"
},
{
"name": "device",
"type": {
"kind": "object",
"properties": [
{
"name": "id",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Id"
},
{
"name": "advertisingId",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Advertising ID"
},
{
"name": "adTrackingEnabled",
"type": {
"kind": "boolean"
},
"readOptional": true,
"displayName": "Ad tracking enabled"
},
{
"name": "manufacturer",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Manufacturer"
},
{
"name": "model",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Model"
},
{
"name": "name",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Name"
},
{
"name": "type",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Type"
},
{
"name": "token",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Token"
}
]
},
"readOptional": true,
"displayName": "Device"
},
{
"name": "ip",
"type": {
"kind": "ip"
},
"readOptional": true,
"displayName": "IP"
},
{
"name": "library",
"type": {
"kind": "object",
"properties": [
{
"name": "name",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Name"
},
{
"name": "version",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Version"
}
]
},
"readOptional": true,
"displayName": "Library"
},
{
"name": "locale",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Locale"
},
{
"name": "location",
"type": {
"kind": "object",
"properties": [
{
"name": "city",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "City"
},
{
"name": "country",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Country"
},
{
"name": "latitude",
"type": {
"kind": "float",
"bitSize": 64
},
"readOptional": true,
"displayName": "Latitude"
},
{
"name": "longitude",
"type": {
"kind": "float",
"bitSize": 64
},
"readOptional": true,
"displayName": "Longitude"
},
{
"name": "speed",
"type": {
"kind": "float",
"bitSize": 64
},
"readOptional": true,
"displayName": "Speed"
}
]
},
"readOptional": true,
"displayName": "Location"
},
{
"name": "network",
"type": {
"kind": "object",
"properties": [
{
"name": "bluetooth",
"type": {
"kind": "boolean"
},
"readOptional": true,
"displayName": "Bluetooth"
},
{
"name": "carrier",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Carrier"
},
{
"name": "cellular",
"type": {
"kind": "boolean"
},
"readOptional": true,
"displayName": "Cellular"
},
{
"name": "wifi",
"type": {
"kind": "boolean"
},
"readOptional": true,
"displayName": "Wi-Fi"
}
]
},
"readOptional": true,
"displayName": "Network"
},
{
"name": "os",
"type": {
"kind": "object",
"properties": [
{
"name": "name",
"type": {
"kind": "string",
"values": [
"Android",
"Windows",
"iOS",
"macOS",
"Linux",
"Chrome OS",
"Other"
]
},
"readOptional": true,
"displayName": "Name"
},
{
"name": "other",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Other"
},
{
"name": "version",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Version"
}
]
},
"readOptional": true,
"displayName": "OS"
},
{
"name": "page",
"type": {
"kind": "object",
"properties": [
{
"name": "path",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Path"
},
{
"name": "referrer",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Referrer"
},
{
"name": "search",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Search"
},
{
"name": "title",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Title"
},
{
"name": "url",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "URL"
}
]
},
"readOptional": true,
"displayName": "Page"
},
{
"name": "referrer",
"type": {
"kind": "object",
"properties": [
{
"name": "id",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "ID"
},
{
"name": "type",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Type"
}
]
},
"readOptional": true,
"displayName": "Referrer"
},
{
"name": "screen",
"type": {
"kind": "object",
"properties": [
{
"name": "width",
"type": {
"kind": "int",
"bitSize": 16
},
"readOptional": true,
"displayName": "Width"
},
{
"name": "height",
"type": {
"kind": "int",
"bitSize": 16
},
"readOptional": true,
"displayName": "Height"
},
{
"name": "density",
"type": {
"kind": "decimal",
"precision": 3,
"scale": 2
},
"readOptional": true,
"displayName": "Density"
}
]
},
"readOptional": true,
"displayName": "Screen"
},
{
"name": "session",
"type": {
"kind": "object",
"properties": [
{
"name": "id",
"type": {
"kind": "int",
"bitSize": 64
},
"readOptional": true,
"displayName": "ID"
},
{
"name": "start",
"type": {
"kind": "boolean"
},
"readOptional": true,
"displayName": "Start"
}
]
},
"readOptional": true,
"displayName": "Session"
},
{
"name": "timezone",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Timezone"
},
{
"name": "userAgent",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "User agent"
}
]
},
"readOptional": true,
"displayName": "Context"
},
{
"name": "event",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Event"
},
{
"name": "groupId",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Group ID"
},
{
"name": "messageId",
"type": {
"kind": "string"
},
"displayName": "Message ID"
},
{
"name": "name",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Name"
},
{
"name": "properties",
"type": {
"kind": "json"
},
"readOptional": true,
"displayName": "Properties"
},
{
"name": "receivedAt",
"type": {
"kind": "datetime"
},
"displayName": "Received at"
},
{
"name": "sentAt",
"type": {
"kind": "datetime"
},
"displayName": "Sent at"
},
{
"name": "originalTimestamp",
"type": {
"kind": "datetime"
},
"displayName": "Original timestamp"
},
{
"name": "timestamp",
"type": {
"kind": "datetime"
},
"displayName": "Timestamp"
},
{
"name": "traits",
"type": {
"kind": "json"
},
"displayName": "Traits"
},
{
"name": "type",
"type": {
"kind": "string",
"values": [
"alias",
"identify",
"group",
"page",
"screen",
"track"
]
},
"displayName": "Type"
},
{
"name": "previousId",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "Previous ID"
},
{
"name": "userId",
"type": {
"kind": "string"
},
"readOptional": true,
"displayName": "User ID"
}
]
}
}