Report a run (called by the pipeline's DAG)
curl --request POST \
--url https://api.example.com/api/ingest/pipelines/{pipeline_id}/runs/report \
--header 'Authorization-PSK: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"airflow_run_id": "<string>",
"rows_read": 1,
"rows_written": 1,
"checks_passed": 1,
"checks_total": 1,
"schema_change": {
"added": [
"<string>"
],
"changed": [
"<string>"
]
}
}
'import requests
url = "https://api.example.com/api/ingest/pipelines/{pipeline_id}/runs/report"
payload = {
"airflow_run_id": "<string>",
"rows_read": 1,
"rows_written": 1,
"checks_passed": 1,
"checks_total": 1,
"schema_change": {
"added": ["<string>"],
"changed": ["<string>"]
}
}
headers = {
"Authorization-PSK": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Authorization-PSK': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
airflow_run_id: '<string>',
rows_read: 1,
rows_written: 1,
checks_passed: 1,
checks_total: 1,
schema_change: {added: ['<string>'], changed: ['<string>']}
})
};
fetch('https://api.example.com/api/ingest/pipelines/{pipeline_id}/runs/report', 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/ingest/pipelines/{pipeline_id}/runs/report",
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([
'airflow_run_id' => '<string>',
'rows_read' => 1,
'rows_written' => 1,
'checks_passed' => 1,
'checks_total' => 1,
'schema_change' => [
'added' => [
'<string>'
],
'changed' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization-PSK: <api-key>",
"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/ingest/pipelines/{pipeline_id}/runs/report"
payload := strings.NewReader("{\n \"airflow_run_id\": \"<string>\",\n \"rows_read\": 1,\n \"rows_written\": 1,\n \"checks_passed\": 1,\n \"checks_total\": 1,\n \"schema_change\": {\n \"added\": [\n \"<string>\"\n ],\n \"changed\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization-PSK", "<api-key>")
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/ingest/pipelines/{pipeline_id}/runs/report")
.header("Authorization-PSK", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"airflow_run_id\": \"<string>\",\n \"rows_read\": 1,\n \"rows_written\": 1,\n \"checks_passed\": 1,\n \"checks_total\": 1,\n \"schema_change\": {\n \"added\": [\n \"<string>\"\n ],\n \"changed\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/ingest/pipelines/{pipeline_id}/runs/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization-PSK"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"airflow_run_id\": \"<string>\",\n \"rows_read\": 1,\n \"rows_written\": 1,\n \"checks_passed\": 1,\n \"checks_total\": 1,\n \"schema_change\": {\n \"added\": [\n \"<string>\"\n ],\n \"changed\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "schedule",
"status": "queued",
"phase": "reading",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"duration_s": 123,
"rows_read": 123,
"rows_written": 123,
"checks_passed": 123,
"checks_total": 123,
"error_kind": "schema_drift",
"error": "<string>",
"schema_change": {
"added": [
"<string>"
],
"changed": [
"<string>"
]
},
"governance": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Ingest pipelines
Report a run (called by the pipeline's DAG)
Phase changes and final counts from the DAG, with the API’s PSK, as
PUT /jobs/{id}/status takes. The same report twice changes nothing.
POST
/
api
/
ingest
/
pipelines
/
{pipeline_id}
/
runs
/
report
Report a run (called by the pipeline's DAG)
curl --request POST \
--url https://api.example.com/api/ingest/pipelines/{pipeline_id}/runs/report \
--header 'Authorization-PSK: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"airflow_run_id": "<string>",
"rows_read": 1,
"rows_written": 1,
"checks_passed": 1,
"checks_total": 1,
"schema_change": {
"added": [
"<string>"
],
"changed": [
"<string>"
]
}
}
'import requests
url = "https://api.example.com/api/ingest/pipelines/{pipeline_id}/runs/report"
payload = {
"airflow_run_id": "<string>",
"rows_read": 1,
"rows_written": 1,
"checks_passed": 1,
"checks_total": 1,
"schema_change": {
"added": ["<string>"],
"changed": ["<string>"]
}
}
headers = {
"Authorization-PSK": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Authorization-PSK': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
airflow_run_id: '<string>',
rows_read: 1,
rows_written: 1,
checks_passed: 1,
checks_total: 1,
schema_change: {added: ['<string>'], changed: ['<string>']}
})
};
fetch('https://api.example.com/api/ingest/pipelines/{pipeline_id}/runs/report', 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/ingest/pipelines/{pipeline_id}/runs/report",
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([
'airflow_run_id' => '<string>',
'rows_read' => 1,
'rows_written' => 1,
'checks_passed' => 1,
'checks_total' => 1,
'schema_change' => [
'added' => [
'<string>'
],
'changed' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization-PSK: <api-key>",
"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/ingest/pipelines/{pipeline_id}/runs/report"
payload := strings.NewReader("{\n \"airflow_run_id\": \"<string>\",\n \"rows_read\": 1,\n \"rows_written\": 1,\n \"checks_passed\": 1,\n \"checks_total\": 1,\n \"schema_change\": {\n \"added\": [\n \"<string>\"\n ],\n \"changed\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization-PSK", "<api-key>")
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/ingest/pipelines/{pipeline_id}/runs/report")
.header("Authorization-PSK", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"airflow_run_id\": \"<string>\",\n \"rows_read\": 1,\n \"rows_written\": 1,\n \"checks_passed\": 1,\n \"checks_total\": 1,\n \"schema_change\": {\n \"added\": [\n \"<string>\"\n ],\n \"changed\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/ingest/pipelines/{pipeline_id}/runs/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization-PSK"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"airflow_run_id\": \"<string>\",\n \"rows_read\": 1,\n \"rows_written\": 1,\n \"checks_passed\": 1,\n \"checks_total\": 1,\n \"schema_change\": {\n \"added\": [\n \"<string>\"\n ],\n \"changed\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "schedule",
"status": "queued",
"phase": "reading",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"duration_s": 123,
"rows_read": 123,
"rows_written": 123,
"checks_passed": 123,
"checks_total": 123,
"error_kind": "schema_drift",
"error": "<string>",
"schema_change": {
"added": [
"<string>"
],
"changed": [
"<string>"
]
},
"governance": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
The pipeline's id.
Body
application/json
What a DAG says about its run, at each phase and at the end.
Required string length:
1 - 250Available options:
queued, running, succeeded, failed Available options:
reading, writing, checking, registering, done Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Available options:
schema_drift, source_unreachable, cast_failed, dq_failed, permission_denied, other Show child attributes
Show child attributes
Response
Successful Response
Available options:
schedule, manual, create Available options:
queued, running, succeeded, failed Available options:
reading, writing, checking, registering, done Available options:
schema_drift, source_unreachable, cast_failed, dq_failed, permission_denied, other Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

