curl --request POST \
--url https://api.orbit.devotel.io/api/v1/cdp/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "Warehouse orders sync",
"kind": "postgres",
"connection": "postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require",
"sql_query": "SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, '1970-01-01') ORDER BY updated_at LIMIT 1000",
"cursor_column": "updated_at",
"event_name": "order.synced",
"schedule_minutes": 60
}
EOFimport requests
url = "https://api.orbit.devotel.io/api/v1/cdp/sources"
payload = {
"name": "Warehouse orders sync",
"kind": "postgres",
"connection": "postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require",
"sql_query": "SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, '1970-01-01') ORDER BY updated_at LIMIT 1000",
"cursor_column": "updated_at",
"event_name": "order.synced",
"schedule_minutes": 60
}
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: 'Warehouse orders sync',
kind: 'postgres',
connection: 'postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require',
sql_query: 'SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, \'1970-01-01\') ORDER BY updated_at LIMIT 1000',
cursor_column: 'updated_at',
event_name: 'order.synced',
schedule_minutes: 60
})
};
fetch('https://api.orbit.devotel.io/api/v1/cdp/sources', 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://api.orbit.devotel.io/api/v1/cdp/sources",
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' => 'Warehouse orders sync',
'kind' => 'postgres',
'connection' => 'postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require',
'sql_query' => 'SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, \'1970-01-01\') ORDER BY updated_at LIMIT 1000',
'cursor_column' => 'updated_at',
'event_name' => 'order.synced',
'schedule_minutes' => 60
]),
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://api.orbit.devotel.io/api/v1/cdp/sources"
payload := strings.NewReader("{\n \"name\": \"Warehouse orders sync\",\n \"kind\": \"postgres\",\n \"connection\": \"postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require\",\n \"sql_query\": \"SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, '1970-01-01') ORDER BY updated_at LIMIT 1000\",\n \"cursor_column\": \"updated_at\",\n \"event_name\": \"order.synced\",\n \"schedule_minutes\": 60\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://api.orbit.devotel.io/api/v1/cdp/sources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Warehouse orders sync\",\n \"kind\": \"postgres\",\n \"connection\": \"postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require\",\n \"sql_query\": \"SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, '1970-01-01') ORDER BY updated_at LIMIT 1000\",\n \"cursor_column\": \"updated_at\",\n \"event_name\": \"order.synced\",\n \"schedule_minutes\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/cdp/sources")
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\": \"Warehouse orders sync\",\n \"kind\": \"postgres\",\n \"connection\": \"postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require\",\n \"sql_query\": \"SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, '1970-01-01') ORDER BY updated_at LIMIT 1000\",\n \"cursor_column\": \"updated_at\",\n \"event_name\": \"order.synced\",\n \"schedule_minutes\": 60\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}Create a CDP reverse-ETL source
Register a warehouse reverse-ETL source that periodically runs a read-only SELECT against a customer warehouse and emits each returned row as a CDP event. Supply the warehouse kind, the encrypted-at-rest connection string, a parameterised sql_query containing the {cursor} placeholder the scheduler binds to the last watermark, the cursor_column that advances it, and the event_name to emit under. The query must be a single SELECT (no UPDATE / DELETE / DDL). Optionally set schedule_minutes (5–1440, default 60) and an initial_cursor_value. Owner / admin / developer only, and the creation is audit-logged.
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/cdp/sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "Warehouse orders sync",
"kind": "postgres",
"connection": "postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require",
"sql_query": "SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, '1970-01-01') ORDER BY updated_at LIMIT 1000",
"cursor_column": "updated_at",
"event_name": "order.synced",
"schedule_minutes": 60
}
EOFimport requests
url = "https://api.orbit.devotel.io/api/v1/cdp/sources"
payload = {
"name": "Warehouse orders sync",
"kind": "postgres",
"connection": "postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require",
"sql_query": "SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, '1970-01-01') ORDER BY updated_at LIMIT 1000",
"cursor_column": "updated_at",
"event_name": "order.synced",
"schedule_minutes": 60
}
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: 'Warehouse orders sync',
kind: 'postgres',
connection: 'postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require',
sql_query: 'SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, \'1970-01-01\') ORDER BY updated_at LIMIT 1000',
cursor_column: 'updated_at',
event_name: 'order.synced',
schedule_minutes: 60
})
};
fetch('https://api.orbit.devotel.io/api/v1/cdp/sources', 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://api.orbit.devotel.io/api/v1/cdp/sources",
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' => 'Warehouse orders sync',
'kind' => 'postgres',
'connection' => 'postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require',
'sql_query' => 'SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, \'1970-01-01\') ORDER BY updated_at LIMIT 1000',
'cursor_column' => 'updated_at',
'event_name' => 'order.synced',
'schedule_minutes' => 60
]),
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://api.orbit.devotel.io/api/v1/cdp/sources"
payload := strings.NewReader("{\n \"name\": \"Warehouse orders sync\",\n \"kind\": \"postgres\",\n \"connection\": \"postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require\",\n \"sql_query\": \"SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, '1970-01-01') ORDER BY updated_at LIMIT 1000\",\n \"cursor_column\": \"updated_at\",\n \"event_name\": \"order.synced\",\n \"schedule_minutes\": 60\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://api.orbit.devotel.io/api/v1/cdp/sources")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Warehouse orders sync\",\n \"kind\": \"postgres\",\n \"connection\": \"postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require\",\n \"sql_query\": \"SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, '1970-01-01') ORDER BY updated_at LIMIT 1000\",\n \"cursor_column\": \"updated_at\",\n \"event_name\": \"order.synced\",\n \"schedule_minutes\": 60\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/cdp/sources")
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\": \"Warehouse orders sync\",\n \"kind\": \"postgres\",\n \"connection\": \"postgres://readonly:***@warehouse.internal:5432/analytics?sslmode=require\",\n \"sql_query\": \"SELECT id, email, updated_at FROM orders WHERE updated_at > COALESCE({cursor}::timestamptz, '1970-01-01') ORDER BY updated_at LIMIT 1000\",\n \"cursor_column\": \"updated_at\",\n \"event_name\": \"order.synced\",\n \"schedule_minutes\": 60\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>"
},
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docs_url": "<string>"
}
}Authorizations
Dashboard JWT token from Clerk
Body
120postgres, bigquery, snowflake, databricks Warehouse connection string / credential blob; stored encrypted at rest and never returned.
Read-only SELECT containing the {cursor} placeholder the scheduler binds to the incremental watermark.
Column whose max value advances the incremental cursor between runs.
CDP event name each emitted row is recorded under.
5 <= x <= 1440Optional starting watermark; defaults to null (the query should COALESCE null to an epoch bound).