curl -X POST https://<your-instance>/v1/sdk/import-pipeline \
-H "Authorization: Bearer trvh_sdk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "ADP - MLS Property Ingestion",
"category": "Real Estate",
"tags": ["adp", "mls"],
"source": {
"connectionId": "D2026A00003",
"type": "api",
"config": {
"endpoint": "/v2/property/snapshot",
"paginated": true,
"paginationKey": "pagetoken",
"rootKey": "property"
}
},
"destination": {
"connectionId": "D2026A00002",
"vendor": "POSTGRESQL",
"schemaName": "mls_data"
},
"steps": [
{
"type": "transform",
"name": "Map & Coerce Fields",
"config": {
"fieldMappings": [
{"source": "address.line1", "target": "address_line1"},
{"source": "summary.yearBuilt", "target": "year_built"}
],
"rules": [
{"field": "year_built", "rule": "to_integer"}
]
}
},
{
"type": "validate",
"name": "Validate Required Fields",
"config": {
"rules": [
{"field": "attom_id", "rule": "not_null"},
{"field": "zip", "rule": "regex", "params": {"pattern": "^\\d{5}$"}}
]
}
},
{
"type": "load",
"name": "Load to Postgres",
"config": { "tableName": "mls_properties_with_address" }
},
{
"type": "reconcile",
"name": "ADP Reconciliation",
"config": {
"mappingSource": "default",
"compareRowCounts": true,
"checkFieldCompleteness": true,
"screenMapEnabled": true
}
}
],
"schedule": {
"isEnabled": true,
"frequency": "daily",
"startTime": "02:00"
}
}'
{
"success": true,
"message": "Pipeline imported successfully.",
"data": {
"pipelineId": "DP-1717000000000",
"name": "ADP - MLS Property Ingestion",
"status": "draft",
"steps": [
{"id": "step-1717000000000-0", "type": "source", "name": "Extract MLS API", "status": "configured"},
{"id": "step-1717000000000-1", "type": "transform", "name": "Map & Coerce Fields", "status": "configured"},
{"id": "step-1717000000000-2", "type": "validate", "name": "Validate Required Fields", "status": "configured"},
{"id": "step-1717000000000-3", "type": "load", "name": "Load to Postgres", "status": "configured"},
{"id": "step-1717000000000-4", "type": "reconcile", "name": "ADP Reconciliation", "status": "configured"}
]
}
}
{
"success": false,
"message": "Pipeline JSON must include a name."
}
{
"error": "API key required"
}
SDK API
Import Data Pipeline
Create a complete data pipeline from a JSON definition (API key auth)
POST
/
v1
/
sdk
/
import-pipeline
curl -X POST https://<your-instance>/v1/sdk/import-pipeline \
-H "Authorization: Bearer trvh_sdk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "ADP - MLS Property Ingestion",
"category": "Real Estate",
"tags": ["adp", "mls"],
"source": {
"connectionId": "D2026A00003",
"type": "api",
"config": {
"endpoint": "/v2/property/snapshot",
"paginated": true,
"paginationKey": "pagetoken",
"rootKey": "property"
}
},
"destination": {
"connectionId": "D2026A00002",
"vendor": "POSTGRESQL",
"schemaName": "mls_data"
},
"steps": [
{
"type": "transform",
"name": "Map & Coerce Fields",
"config": {
"fieldMappings": [
{"source": "address.line1", "target": "address_line1"},
{"source": "summary.yearBuilt", "target": "year_built"}
],
"rules": [
{"field": "year_built", "rule": "to_integer"}
]
}
},
{
"type": "validate",
"name": "Validate Required Fields",
"config": {
"rules": [
{"field": "attom_id", "rule": "not_null"},
{"field": "zip", "rule": "regex", "params": {"pattern": "^\\d{5}$"}}
]
}
},
{
"type": "load",
"name": "Load to Postgres",
"config": { "tableName": "mls_properties_with_address" }
},
{
"type": "reconcile",
"name": "ADP Reconciliation",
"config": {
"mappingSource": "default",
"compareRowCounts": true,
"checkFieldCompleteness": true,
"screenMapEnabled": true
}
}
],
"schedule": {
"isEnabled": true,
"frequency": "daily",
"startTime": "02:00"
}
}'
{
"success": true,
"message": "Pipeline imported successfully.",
"data": {
"pipelineId": "DP-1717000000000",
"name": "ADP - MLS Property Ingestion",
"status": "draft",
"steps": [
{"id": "step-1717000000000-0", "type": "source", "name": "Extract MLS API", "status": "configured"},
{"id": "step-1717000000000-1", "type": "transform", "name": "Map & Coerce Fields", "status": "configured"},
{"id": "step-1717000000000-2", "type": "validate", "name": "Validate Required Fields", "status": "configured"},
{"id": "step-1717000000000-3", "type": "load", "name": "Load to Postgres", "status": "configured"},
{"id": "step-1717000000000-4", "type": "reconcile", "name": "ADP Reconciliation", "status": "configured"}
]
}
}
{
"success": false,
"message": "Pipeline JSON must include a name."
}
{
"error": "API key required"
}
Single-shot pipeline creation. Accepts a declarative payload describing pipeline steps, schedule, and metadata — returns the created pipeline ID.
This endpoint uses API key authentication. Pass your key via
Authorization: Bearer trvh_sdk_... or x-api-key header.Request Body
string
required
Pipeline name displayed in the UI.
string
Optional description for the pipeline.
string
Pipeline category (e.g.,
"Real Estate", "E-Commerce").array
Tags for the pipeline (e.g.,
["adp", "mls", "automated"]).object
required
Where data comes FROM. This connection is inherited by all
source type steps.Show source properties
Show source properties
string
required
Connection ID (e.g.,
D2026A00003). Same ID format as BDM/Dashboard import dbId.string
required
Connection type:
api, database, file, s3.object
Source-level defaults inherited by
source steps. For API sources: endpoint, method, paginated, paginationKey, rootKey. For DB sources: schemaName, tableName.object
required
Where data goes TO. This connection is inherited by
load, stage, and reconcile steps.array
required
Ordered array of pipeline step definitions. Steps execute sequentially — each step depends on the previous one.
object
Optional schedule for automatic execution.
Step Type Configs
Source
Extract data from a database, API, file, or S3 bucket. InheritsconnectionId and connection config from the top-level source object. You typically don’t need a source step in the steps array — one is auto-generated from the top-level source definition. Only add explicit source steps when you need multiple sources (e.g., a second API call mid-pipeline for enrichment).
string
Override connection ID (for additional sources beyond the primary). If omitted, inherits from top-level
source.connectionId.string
Override API endpoint (for API sources).
string
Table name to extract from (for DB sources).
Transform
Field mapping and data transformation rules.array
array
Validate
Data validation rules.array
Quality
Data quality checks.array
DB Lookup
Read from another database for reference/enrichment.string
required
Connection ID for lookup database.
string
Schema name.
string
required
Table to look up from.
string
required
Field from pipeline data to match on.
string
required
Field in lookup table to join on.
string
Comma-separated list of fields to pull from lookup table.
Stage
Write to a staging/temporary table for intermediate processing.string
Staging schema name.
string
required
Staging table/view name.
Load
Write to the final destination database (Postgres for v1). InheritsconnectionId, vendor, and schemaName from the top-level destination object.
string
required
Destination table name.
string
Override connection ID. If omitted, inherits from top-level
destination.connectionId.string
Override schema. If omitted, inherits from top-level
destination.schemaName.Reconcile
Post-load data reconciliation — compares source vs destination.string
default:"default"
"default" uses the built-in ADP screen map. "custom" expects a mapping file at execution time.boolean
default:true
Compare source and destination row counts.
boolean
default:true
Check non-null completeness per field.
boolean
default:true
Run ADP screen-level validation.
Response
boolean
Whether the import succeeded.
object
curl -X POST https://<your-instance>/v1/sdk/import-pipeline \
-H "Authorization: Bearer trvh_sdk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "ADP - MLS Property Ingestion",
"category": "Real Estate",
"tags": ["adp", "mls"],
"source": {
"connectionId": "D2026A00003",
"type": "api",
"config": {
"endpoint": "/v2/property/snapshot",
"paginated": true,
"paginationKey": "pagetoken",
"rootKey": "property"
}
},
"destination": {
"connectionId": "D2026A00002",
"vendor": "POSTGRESQL",
"schemaName": "mls_data"
},
"steps": [
{
"type": "transform",
"name": "Map & Coerce Fields",
"config": {
"fieldMappings": [
{"source": "address.line1", "target": "address_line1"},
{"source": "summary.yearBuilt", "target": "year_built"}
],
"rules": [
{"field": "year_built", "rule": "to_integer"}
]
}
},
{
"type": "validate",
"name": "Validate Required Fields",
"config": {
"rules": [
{"field": "attom_id", "rule": "not_null"},
{"field": "zip", "rule": "regex", "params": {"pattern": "^\\d{5}$"}}
]
}
},
{
"type": "load",
"name": "Load to Postgres",
"config": { "tableName": "mls_properties_with_address" }
},
{
"type": "reconcile",
"name": "ADP Reconciliation",
"config": {
"mappingSource": "default",
"compareRowCounts": true,
"checkFieldCompleteness": true,
"screenMapEnabled": true
}
}
],
"schedule": {
"isEnabled": true,
"frequency": "daily",
"startTime": "02:00"
}
}'
{
"success": true,
"message": "Pipeline imported successfully.",
"data": {
"pipelineId": "DP-1717000000000",
"name": "ADP - MLS Property Ingestion",
"status": "draft",
"steps": [
{"id": "step-1717000000000-0", "type": "source", "name": "Extract MLS API", "status": "configured"},
{"id": "step-1717000000000-1", "type": "transform", "name": "Map & Coerce Fields", "status": "configured"},
{"id": "step-1717000000000-2", "type": "validate", "name": "Validate Required Fields", "status": "configured"},
{"id": "step-1717000000000-3", "type": "load", "name": "Load to Postgres", "status": "configured"},
{"id": "step-1717000000000-4", "type": "reconcile", "name": "ADP Reconciliation", "status": "configured"}
]
}
}
{
"success": false,
"message": "Pipeline JSON must include a name."
}
{
"error": "API key required"
}