Skip to main content
POST
/
api
/
airbyte
/
ingest
Create PyAirbyte ingestion job
curl --request POST \
  --url https://api.example.com/api/airbyte/ingest \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "source_name": "<string>",
  "source_config": {},
  "schema_name": "<string>",
  "streams": [
    "<string>"
  ],
  "merge": "<string>",
  "schedule": "<string>",
  "domain": "<string>",
  "tags": [
    "<string>"
  ],
  "owner_id": "<string>",
  "column_transformations": [
    {
      "column": "<string>",
      "stream": "<string>",
      "new_name": "<string>",
      "encryption_key_name": "<string>"
    }
  ],
  "archive_staging": true,
  "add_ingestion_metadata": true
}
'
import requests

url = "https://api.example.com/api/airbyte/ingest"

payload = {
"name": "<string>",
"source_name": "<string>",
"source_config": {},
"schema_name": "<string>",
"streams": ["<string>"],
"merge": "<string>",
"schedule": "<string>",
"domain": "<string>",
"tags": ["<string>"],
"owner_id": "<string>",
"column_transformations": [
{
"column": "<string>",
"stream": "<string>",
"new_name": "<string>",
"encryption_key_name": "<string>"
}
],
"archive_staging": True,
"add_ingestion_metadata": True
}
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>',
source_name: '<string>',
source_config: {},
schema_name: '<string>',
streams: ['<string>'],
merge: '<string>',
schedule: '<string>',
domain: '<string>',
tags: ['<string>'],
owner_id: '<string>',
column_transformations: [
{
column: '<string>',
stream: '<string>',
new_name: '<string>',
encryption_key_name: '<string>'
}
],
archive_staging: true,
add_ingestion_metadata: true
})
};

fetch('https://api.example.com/api/airbyte/ingest', 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.example.com/api/airbyte/ingest",
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>',
'source_name' => '<string>',
'source_config' => [

],
'schema_name' => '<string>',
'streams' => [
'<string>'
],
'merge' => '<string>',
'schedule' => '<string>',
'domain' => '<string>',
'tags' => [
'<string>'
],
'owner_id' => '<string>',
'column_transformations' => [
[
'column' => '<string>',
'stream' => '<string>',
'new_name' => '<string>',
'encryption_key_name' => '<string>'
]
],
'archive_staging' => true,
'add_ingestion_metadata' => true
]),
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.example.com/api/airbyte/ingest"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"source_name\": \"<string>\",\n \"source_config\": {},\n \"schema_name\": \"<string>\",\n \"streams\": [\n \"<string>\"\n ],\n \"merge\": \"<string>\",\n \"schedule\": \"<string>\",\n \"domain\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"owner_id\": \"<string>\",\n \"column_transformations\": [\n {\n \"column\": \"<string>\",\n \"stream\": \"<string>\",\n \"new_name\": \"<string>\",\n \"encryption_key_name\": \"<string>\"\n }\n ],\n \"archive_staging\": true,\n \"add_ingestion_metadata\": true\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.example.com/api/airbyte/ingest")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"source_name\": \"<string>\",\n \"source_config\": {},\n \"schema_name\": \"<string>\",\n \"streams\": [\n \"<string>\"\n ],\n \"merge\": \"<string>\",\n \"schedule\": \"<string>\",\n \"domain\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"owner_id\": \"<string>\",\n \"column_transformations\": [\n {\n \"column\": \"<string>\",\n \"stream\": \"<string>\",\n \"new_name\": \"<string>\",\n \"encryption_key_name\": \"<string>\"\n }\n ],\n \"archive_staging\": true,\n \"add_ingestion_metadata\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/api/airbyte/ingest")

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 \"source_name\": \"<string>\",\n \"source_config\": {},\n \"schema_name\": \"<string>\",\n \"streams\": [\n \"<string>\"\n ],\n \"merge\": \"<string>\",\n \"schedule\": \"<string>\",\n \"domain\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"owner_id\": \"<string>\",\n \"column_transformations\": [\n {\n \"column\": \"<string>\",\n \"stream\": \"<string>\",\n \"new_name\": \"<string>\",\n \"encryption_key_name\": \"<string>\"\n }\n ],\n \"archive_staging\": true,\n \"add_ingestion_metadata\": true\n}"

response = http.request(request)
puts response.read_body
{
  "flow_url": "<string>",
  "job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "error": "<string>"
}
{
"error": "<string>",
"code": 500
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
{
"error": "<string>",
"code": 500
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Request model for creating an Airbyte ingestion job.

name
string
required

Name of the ingestion job.

source_name
string
required

PyAirbyte source identifier. For example, 'source-github'.

source_config
Source Config · object
required

Source configuration key-value pairs, including secrets.

schema_name
string
required

Target Iceberg schema where the job creates tables.

mode
enum<string>
required

Write mode.

Available options:
append,
overwrite,
merge
streams
string[] | null

Optional list of streams to sync. If empty, NexusOne syncs all streams.

merge
string | null

Comma-separated merge key columns. Defaults to Airbyte primary keys in merge mode.

schedule
string | null

Cron expression for scheduled runs.

domain
string | null

DataHub domain to assign to ingested tables.

tags
string[] | null

DataHub tags to assign to ingested tables.

owner_id
string | null

Owner user ID.

column_transformations
ColumnTransformation · object[] | null

Optional per-stream column transformations. Use the 'stream' field on each transformation to target a specific stream.

archive_staging
boolean
default:true

Archive staging files to archive/{run_id}/ instead of deleting them after ingestion.

add_ingestion_metadata
boolean
default:true

Add ingestion metadata columns to output tables: ingestion_time, ingestion_run_id, ingestion_mode, and dag_job_id.

Response

Ingestion job created successfully.

flow_url
string
required

Airflow URL to access the ingestion flow.

job_id
string<uuid> | null

A unique ID of the created ingestion job.

error
string | null

Error message if the ingestion fails due to any issue.