Create a pipeline
curl --request POST \
--url https://api.covalenthq.com/platform/pipeline-api/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"project": "<string>",
"topic": "<string>",
"destination_config": {
"type": "<string>",
"url": "<string>",
"user": "<string>",
"password": "<string>"
},
"description": "<string>",
"transforms": {},
"execution_start_from": "<string>",
"execution_stop_from": "<string>",
"abi_file": {},
"abi_contract_addresses": [
"<string>"
]
}
'import requests
url = "https://api.covalenthq.com/platform/pipeline-api/"
payload = {
"name": "<string>",
"project": "<string>",
"topic": "<string>",
"destination_config": {
"type": "<string>",
"url": "<string>",
"user": "<string>",
"password": "<string>"
},
"description": "<string>",
"transforms": {},
"execution_start_from": "<string>",
"execution_stop_from": "<string>",
"abi_file": {},
"abi_contract_addresses": ["<string>"]
}
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: '<string>',
project: '<string>',
topic: '<string>',
destination_config: {type: '<string>', url: '<string>', user: '<string>', password: '<string>'},
description: '<string>',
transforms: {},
execution_start_from: '<string>',
execution_stop_from: '<string>',
abi_file: {},
abi_contract_addresses: ['<string>']
})
};
fetch('https://api.covalenthq.com/platform/pipeline-api/', 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.covalenthq.com/platform/pipeline-api/",
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' => '<string>',
'project' => '<string>',
'topic' => '<string>',
'destination_config' => [
'type' => '<string>',
'url' => '<string>',
'user' => '<string>',
'password' => '<string>'
],
'description' => '<string>',
'transforms' => [
],
'execution_start_from' => '<string>',
'execution_stop_from' => '<string>',
'abi_file' => [
],
'abi_contract_addresses' => [
'<string>'
]
]),
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.covalenthq.com/platform/pipeline-api/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"topic\": \"<string>\",\n \"destination_config\": {\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"transforms\": {},\n \"execution_start_from\": \"<string>\",\n \"execution_stop_from\": \"<string>\",\n \"abi_file\": {},\n \"abi_contract_addresses\": [\n \"<string>\"\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://api.covalenthq.com/platform/pipeline-api/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"topic\": \"<string>\",\n \"destination_config\": {\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"transforms\": {},\n \"execution_start_from\": \"<string>\",\n \"execution_stop_from\": \"<string>\",\n \"abi_file\": {},\n \"abi_contract_addresses\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.covalenthq.com/platform/pipeline-api/")
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\": \"<string>\",\n \"project\": \"<string>\",\n \"topic\": \"<string>\",\n \"destination_config\": {\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"transforms\": {},\n \"execution_start_from\": \"<string>\",\n \"execution_stop_from\": \"<string>\",\n \"abi_file\": {},\n \"abi_contract_addresses\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "pipe_3e8678c5fc9e48a7bf9879ca729",
"name": "From Base Swap to Postgres",
"project": "pipeline-api-hr-1wk-unbounded",
"description": "Base swaps, unbounded",
"topic": "base.mainnet.ref.block.swap.v3",
"destination_config": {
"type": "<string>",
"url": "<string>",
"user": "<string>",
"password": "<string>"
},
"transforms": {
"swaps": "SELECT chain_name, block_height, tx_hash FROM swaps WHERE protocol = 'uniswap_v3'"
},
"execution_start_from": "44745000",
"execution_stop_from": "",
"abi_file": {},
"abi_contract_addresses": [
"<string>"
],
"created_by": {
"id": "user_fb22f43e38ac44edabc7f566c5d",
"email": "jsmith@example.com",
"display_name": "<string>",
"full_name": "<string>"
},
"group": {
"id": "group_d632592ddbde4a499452d25b",
"name": "<string>",
"slug": "<string>",
"is_paid": true,
"is_over_limit": true,
"is_free_trial_expired": true
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"error": true,
"error_message": "<string>",
"error_code": "<string>"
}{
"data": {},
"error": true,
"error_message": "<string>",
"error_code": "<string>"
}{
"data": {},
"error": true,
"error_message": "<string>",
"error_code": "<string>"
}{
"data": {},
"error": true,
"error_message": "<string>",
"error_code": "<string>"
}{
"data": {},
"error": true,
"error_message": "<string>",
"error_code": "<string>"
}Pipeline API
Create a pipeline
Create a new pipeline programmatically.
POST
/
platform
/
pipeline-api
/
Create a pipeline
curl --request POST \
--url https://api.covalenthq.com/platform/pipeline-api/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"project": "<string>",
"topic": "<string>",
"destination_config": {
"type": "<string>",
"url": "<string>",
"user": "<string>",
"password": "<string>"
},
"description": "<string>",
"transforms": {},
"execution_start_from": "<string>",
"execution_stop_from": "<string>",
"abi_file": {},
"abi_contract_addresses": [
"<string>"
]
}
'import requests
url = "https://api.covalenthq.com/platform/pipeline-api/"
payload = {
"name": "<string>",
"project": "<string>",
"topic": "<string>",
"destination_config": {
"type": "<string>",
"url": "<string>",
"user": "<string>",
"password": "<string>"
},
"description": "<string>",
"transforms": {},
"execution_start_from": "<string>",
"execution_stop_from": "<string>",
"abi_file": {},
"abi_contract_addresses": ["<string>"]
}
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: '<string>',
project: '<string>',
topic: '<string>',
destination_config: {type: '<string>', url: '<string>', user: '<string>', password: '<string>'},
description: '<string>',
transforms: {},
execution_start_from: '<string>',
execution_stop_from: '<string>',
abi_file: {},
abi_contract_addresses: ['<string>']
})
};
fetch('https://api.covalenthq.com/platform/pipeline-api/', 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.covalenthq.com/platform/pipeline-api/",
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' => '<string>',
'project' => '<string>',
'topic' => '<string>',
'destination_config' => [
'type' => '<string>',
'url' => '<string>',
'user' => '<string>',
'password' => '<string>'
],
'description' => '<string>',
'transforms' => [
],
'execution_start_from' => '<string>',
'execution_stop_from' => '<string>',
'abi_file' => [
],
'abi_contract_addresses' => [
'<string>'
]
]),
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.covalenthq.com/platform/pipeline-api/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"topic\": \"<string>\",\n \"destination_config\": {\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"transforms\": {},\n \"execution_start_from\": \"<string>\",\n \"execution_stop_from\": \"<string>\",\n \"abi_file\": {},\n \"abi_contract_addresses\": [\n \"<string>\"\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://api.covalenthq.com/platform/pipeline-api/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"project\": \"<string>\",\n \"topic\": \"<string>\",\n \"destination_config\": {\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"transforms\": {},\n \"execution_start_from\": \"<string>\",\n \"execution_stop_from\": \"<string>\",\n \"abi_file\": {},\n \"abi_contract_addresses\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.covalenthq.com/platform/pipeline-api/")
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\": \"<string>\",\n \"project\": \"<string>\",\n \"topic\": \"<string>\",\n \"destination_config\": {\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"user\": \"<string>\",\n \"password\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"transforms\": {},\n \"execution_start_from\": \"<string>\",\n \"execution_stop_from\": \"<string>\",\n \"abi_file\": {},\n \"abi_contract_addresses\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "pipe_3e8678c5fc9e48a7bf9879ca729",
"name": "From Base Swap to Postgres",
"project": "pipeline-api-hr-1wk-unbounded",
"description": "Base swaps, unbounded",
"topic": "base.mainnet.ref.block.swap.v3",
"destination_config": {
"type": "<string>",
"url": "<string>",
"user": "<string>",
"password": "<string>"
},
"transforms": {
"swaps": "SELECT chain_name, block_height, tx_hash FROM swaps WHERE protocol = 'uniswap_v3'"
},
"execution_start_from": "44745000",
"execution_stop_from": "",
"abi_file": {},
"abi_contract_addresses": [
"<string>"
],
"created_by": {
"id": "user_fb22f43e38ac44edabc7f566c5d",
"email": "jsmith@example.com",
"display_name": "<string>",
"full_name": "<string>"
},
"group": {
"id": "group_d632592ddbde4a499452d25b",
"name": "<string>",
"slug": "<string>",
"is_paid": true,
"is_over_limit": true,
"is_free_trial_expired": true
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"error": true,
"error_message": "<string>",
"error_code": "<string>"
}{
"data": {},
"error": true,
"error_message": "<string>",
"error_code": "<string>"
}{
"data": {},
"error": true,
"error_message": "<string>",
"error_code": "<string>"
}{
"data": {},
"error": true,
"error_message": "<string>",
"error_code": "<string>"
}{
"data": {},
"error": true,
"error_message": "<string>",
"error_code": "<string>"
}Requires a ServiceKey. See Service Keys.
destination_type values, topic format, and transforms semantics apply.Authorizations
Pipeline REST endpoints require a ServiceKey. Regular GoldRush API keys are rejected with 403. See Service Keys.
Body
application/json
Body for creating a pipeline. Read-only fields (id, created_by, group, created_at, updated_at) are ignored if supplied.
Available options:
postgres, clickhouse, kafka, object_storage, sqs, webhook Destination-specific connection details. The accepted keys depend on destination_type. Examples: Postgres uses url, user, password; webhook uses url. On read, secret fields are masked as ****** and must be re-supplied in full on a PUT.
Show child attributes
Show child attributes
Available options:
bounded, unbounded Show child attributes
Show child attributes
Available options:
, skip, raw Set to paused to create the pipeline without starting it. Defaults to running.
Available options:
running, paused ⌘I