Create a pipeline
curl --request POST \
--url https://{host}/api/public/v1/pipelines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "orders-to-snowflake",
"region": "us-east-1",
"source_id": 42,
"destination_id": 17,
"sync": {
"frequency": 5,
"auto_sync_new_tables": false
},
"definition_version": 1,
"tables": [
{
"name": "public.orders",
"append_only": false,
"columns": {
"include": [
"<string>"
],
"exclude": [
"<string>"
]
}
}
],
"transformations": [
{
"table": "<string>",
"config": {}
}
],
"hooks": [
{
"id": 123,
"events": [
"pipeline_errored",
"pipeline_stopped"
]
}
]
}
'import requests
url = "https://{host}/api/public/v1/pipelines"
payload = {
"name": "orders-to-snowflake",
"region": "us-east-1",
"source_id": 42,
"destination_id": 17,
"sync": {
"frequency": 5,
"auto_sync_new_tables": False
},
"definition_version": 1,
"tables": [
{
"name": "public.orders",
"append_only": False,
"columns": {
"include": ["<string>"],
"exclude": ["<string>"]
}
}
],
"transformations": [
{
"table": "<string>",
"config": {}
}
],
"hooks": [
{
"id": 123,
"events": ["pipeline_errored", "pipeline_stopped"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'orders-to-snowflake',
region: 'us-east-1',
source_id: 42,
destination_id: 17,
sync: {frequency: 5, auto_sync_new_tables: false},
definition_version: 1,
tables: [
{
name: 'public.orders',
append_only: false,
columns: {include: ['<string>'], exclude: ['<string>']}
}
],
transformations: [{table: '<string>', config: {}}],
hooks: [{id: 123, events: ['pipeline_errored', 'pipeline_stopped']}]
})
};
fetch('https://{host}/api/public/v1/pipelines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/public/v1/pipelines",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'orders-to-snowflake',
'region' => 'us-east-1',
'source_id' => 42,
'destination_id' => 17,
'sync' => [
'frequency' => 5,
'auto_sync_new_tables' => false
],
'definition_version' => 1,
'tables' => [
[
'name' => 'public.orders',
'append_only' => false,
'columns' => [
'include' => [
'<string>'
],
'exclude' => [
'<string>'
]
]
]
],
'transformations' => [
[
'table' => '<string>',
'config' => [
]
]
],
'hooks' => [
[
'id' => 123,
'events' => [
'pipeline_errored',
'pipeline_stopped'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/public/v1/pipelines"
payload := strings.NewReader("{\n \"name\": \"orders-to-snowflake\",\n \"region\": \"us-east-1\",\n \"source_id\": 42,\n \"destination_id\": 17,\n \"sync\": {\n \"frequency\": 5,\n \"auto_sync_new_tables\": false\n },\n \"definition_version\": 1,\n \"tables\": [\n {\n \"name\": \"public.orders\",\n \"append_only\": false,\n \"columns\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"transformations\": [\n {\n \"table\": \"<string>\",\n \"config\": {}\n }\n ],\n \"hooks\": [\n {\n \"id\": 123,\n \"events\": [\n \"pipeline_errored\",\n \"pipeline_stopped\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/api/public/v1/pipelines")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"orders-to-snowflake\",\n \"region\": \"us-east-1\",\n \"source_id\": 42,\n \"destination_id\": 17,\n \"sync\": {\n \"frequency\": 5,\n \"auto_sync_new_tables\": false\n },\n \"definition_version\": 1,\n \"tables\": [\n {\n \"name\": \"public.orders\",\n \"append_only\": false,\n \"columns\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"transformations\": [\n {\n \"table\": \"<string>\",\n \"config\": {}\n }\n ],\n \"hooks\": [\n {\n \"id\": 123,\n \"events\": [\n \"pipeline_errored\",\n \"pipeline_stopped\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/public/v1/pipelines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"orders-to-snowflake\",\n \"region\": \"us-east-1\",\n \"source_id\": 42,\n \"destination_id\": 17,\n \"sync\": {\n \"frequency\": 5,\n \"auto_sync_new_tables\": false\n },\n \"definition_version\": 1,\n \"tables\": [\n {\n \"name\": \"public.orders\",\n \"append_only\": false,\n \"columns\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"transformations\": [\n {\n \"table\": \"<string>\",\n \"config\": {}\n }\n ],\n \"hooks\": [\n {\n \"id\": 123,\n \"events\": [\n \"pipeline_errored\",\n \"pipeline_stopped\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"identifier": "<string>",
"name": "<string>",
"status": "running",
"region": "us-east-1",
"source_id": 123,
"destination_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"code": "not_found"
}{
"detail": "<string>",
"code": "not_found"
}{
"detail": "<string>",
"code": "not_found"
}Pipelines
Create a pipeline
Creates a pipeline from a definition document. The new pipeline is not started; call POST /pipelines/{id}/start when ready.
POST
/
pipelines
Create a pipeline
curl --request POST \
--url https://{host}/api/public/v1/pipelines \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "orders-to-snowflake",
"region": "us-east-1",
"source_id": 42,
"destination_id": 17,
"sync": {
"frequency": 5,
"auto_sync_new_tables": false
},
"definition_version": 1,
"tables": [
{
"name": "public.orders",
"append_only": false,
"columns": {
"include": [
"<string>"
],
"exclude": [
"<string>"
]
}
}
],
"transformations": [
{
"table": "<string>",
"config": {}
}
],
"hooks": [
{
"id": 123,
"events": [
"pipeline_errored",
"pipeline_stopped"
]
}
]
}
'import requests
url = "https://{host}/api/public/v1/pipelines"
payload = {
"name": "orders-to-snowflake",
"region": "us-east-1",
"source_id": 42,
"destination_id": 17,
"sync": {
"frequency": 5,
"auto_sync_new_tables": False
},
"definition_version": 1,
"tables": [
{
"name": "public.orders",
"append_only": False,
"columns": {
"include": ["<string>"],
"exclude": ["<string>"]
}
}
],
"transformations": [
{
"table": "<string>",
"config": {}
}
],
"hooks": [
{
"id": 123,
"events": ["pipeline_errored", "pipeline_stopped"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'orders-to-snowflake',
region: 'us-east-1',
source_id: 42,
destination_id: 17,
sync: {frequency: 5, auto_sync_new_tables: false},
definition_version: 1,
tables: [
{
name: 'public.orders',
append_only: false,
columns: {include: ['<string>'], exclude: ['<string>']}
}
],
transformations: [{table: '<string>', config: {}}],
hooks: [{id: 123, events: ['pipeline_errored', 'pipeline_stopped']}]
})
};
fetch('https://{host}/api/public/v1/pipelines', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/api/public/v1/pipelines",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'orders-to-snowflake',
'region' => 'us-east-1',
'source_id' => 42,
'destination_id' => 17,
'sync' => [
'frequency' => 5,
'auto_sync_new_tables' => false
],
'definition_version' => 1,
'tables' => [
[
'name' => 'public.orders',
'append_only' => false,
'columns' => [
'include' => [
'<string>'
],
'exclude' => [
'<string>'
]
]
]
],
'transformations' => [
[
'table' => '<string>',
'config' => [
]
]
],
'hooks' => [
[
'id' => 123,
'events' => [
'pipeline_errored',
'pipeline_stopped'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/api/public/v1/pipelines"
payload := strings.NewReader("{\n \"name\": \"orders-to-snowflake\",\n \"region\": \"us-east-1\",\n \"source_id\": 42,\n \"destination_id\": 17,\n \"sync\": {\n \"frequency\": 5,\n \"auto_sync_new_tables\": false\n },\n \"definition_version\": 1,\n \"tables\": [\n {\n \"name\": \"public.orders\",\n \"append_only\": false,\n \"columns\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"transformations\": [\n {\n \"table\": \"<string>\",\n \"config\": {}\n }\n ],\n \"hooks\": [\n {\n \"id\": 123,\n \"events\": [\n \"pipeline_errored\",\n \"pipeline_stopped\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/api/public/v1/pipelines")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"orders-to-snowflake\",\n \"region\": \"us-east-1\",\n \"source_id\": 42,\n \"destination_id\": 17,\n \"sync\": {\n \"frequency\": 5,\n \"auto_sync_new_tables\": false\n },\n \"definition_version\": 1,\n \"tables\": [\n {\n \"name\": \"public.orders\",\n \"append_only\": false,\n \"columns\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"transformations\": [\n {\n \"table\": \"<string>\",\n \"config\": {}\n }\n ],\n \"hooks\": [\n {\n \"id\": 123,\n \"events\": [\n \"pipeline_errored\",\n \"pipeline_stopped\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/api/public/v1/pipelines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"orders-to-snowflake\",\n \"region\": \"us-east-1\",\n \"source_id\": 42,\n \"destination_id\": 17,\n \"sync\": {\n \"frequency\": 5,\n \"auto_sync_new_tables\": false\n },\n \"definition_version\": 1,\n \"tables\": [\n {\n \"name\": \"public.orders\",\n \"append_only\": false,\n \"columns\": {\n \"include\": [\n \"<string>\"\n ],\n \"exclude\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"transformations\": [\n {\n \"table\": \"<string>\",\n \"config\": {}\n }\n ],\n \"hooks\": [\n {\n \"id\": 123,\n \"events\": [\n \"pipeline_errored\",\n \"pipeline_stopped\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"identifier": "<string>",
"name": "<string>",
"status": "running",
"region": "us-east-1",
"source_id": 123,
"destination_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>",
"code": "not_found"
}{
"detail": "<string>",
"code": "not_found"
}{
"detail": "<string>",
"code": "not_found"
}Body
application/jsonapplication/yaml
A customer-facing description of the pipeline. It omits credentials and internal fields. Unknown keys are rejected.
Was this page helpful?