Create data integrity job for a destination
curl --request POST \
--url https://api.prequel.co/destinations/{destination_id}/data-integrity \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"models": [
{
"model_name": "<string>",
"sample_primary_key_ids": [
"<string>"
]
}
],
"start_integrity_window_at": "2023-11-07T05:31:56Z",
"end_integrity_window_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.prequel.co/destinations/{destination_id}/data-integrity"
payload = {
"models": [
{
"model_name": "<string>",
"sample_primary_key_ids": ["<string>"]
}
],
"start_integrity_window_at": "2023-11-07T05:31:56Z",
"end_integrity_window_at": "2023-11-07T05:31:56Z"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
models: [{model_name: '<string>', sample_primary_key_ids: ['<string>']}],
start_integrity_window_at: '2023-11-07T05:31:56Z',
end_integrity_window_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.prequel.co/destinations/{destination_id}/data-integrity', 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.prequel.co/destinations/{destination_id}/data-integrity",
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([
'models' => [
[
'model_name' => '<string>',
'sample_primary_key_ids' => [
'<string>'
]
]
],
'start_integrity_window_at' => '2023-11-07T05:31:56Z',
'end_integrity_window_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.prequel.co/destinations/{destination_id}/data-integrity"
payload := strings.NewReader("{\n \"models\": [\n {\n \"model_name\": \"<string>\",\n \"sample_primary_key_ids\": [\n \"<string>\"\n ]\n }\n ],\n \"start_integrity_window_at\": \"2023-11-07T05:31:56Z\",\n \"end_integrity_window_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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.prequel.co/destinations/{destination_id}/data-integrity")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"models\": [\n {\n \"model_name\": \"<string>\",\n \"sample_primary_key_ids\": [\n \"<string>\"\n ]\n }\n ],\n \"start_integrity_window_at\": \"2023-11-07T05:31:56Z\",\n \"end_integrity_window_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prequel.co/destinations/{destination_id}/data-integrity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"models\": [\n {\n \"model_name\": \"<string>\",\n \"sample_primary_key_ids\": [\n \"<string>\"\n ]\n }\n ],\n \"start_integrity_window_at\": \"2023-11-07T05:31:56Z\",\n \"end_integrity_window_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"data": {
"job": {
"id": "<string>",
"org_schema": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"destination_id": "<string>",
"status": "<string>",
"model_ids": [
"<string>"
],
"model_sample_primary_ids": {},
"data_integrity_results": [
{
"model_name": "<string>",
"is_healthy": true,
"error_message": "<string>",
"sampling_rate": 123,
"total_rows_compared": 123,
"total_rows_stale": 123,
"total_rows_pending": 123,
"total_rows_missing": 123,
"total_rows_incorrect": 123,
"total_rows_orphaned": 123,
"mismatched_partitions": [
{
"source_row_count": 123,
"destination_row_count": 123,
"last_modified_lower_bound_epoch": 123,
"last_modified_upper_bound_epoch": 123
}
]
}
],
"log_message": "<string>"
}
},
"message": "<string>"
}{
"status": "<string>",
"message": "<string>",
"data": null
}{
"status": "<string>",
"message": "<string>",
"data": null
}{
"status": "<string>",
"message": "<string>",
"data": null
}{
"status": "<string>",
"message": "<string>",
"data": null
}Data Integrity
Create data integrity job for a destination
Enqueue a job to check data integrity.
POST
/
destinations
/
{destination_id}
/
data-integrity
Create data integrity job for a destination
curl --request POST \
--url https://api.prequel.co/destinations/{destination_id}/data-integrity \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"models": [
{
"model_name": "<string>",
"sample_primary_key_ids": [
"<string>"
]
}
],
"start_integrity_window_at": "2023-11-07T05:31:56Z",
"end_integrity_window_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.prequel.co/destinations/{destination_id}/data-integrity"
payload = {
"models": [
{
"model_name": "<string>",
"sample_primary_key_ids": ["<string>"]
}
],
"start_integrity_window_at": "2023-11-07T05:31:56Z",
"end_integrity_window_at": "2023-11-07T05:31:56Z"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
models: [{model_name: '<string>', sample_primary_key_ids: ['<string>']}],
start_integrity_window_at: '2023-11-07T05:31:56Z',
end_integrity_window_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.prequel.co/destinations/{destination_id}/data-integrity', 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.prequel.co/destinations/{destination_id}/data-integrity",
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([
'models' => [
[
'model_name' => '<string>',
'sample_primary_key_ids' => [
'<string>'
]
]
],
'start_integrity_window_at' => '2023-11-07T05:31:56Z',
'end_integrity_window_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.prequel.co/destinations/{destination_id}/data-integrity"
payload := strings.NewReader("{\n \"models\": [\n {\n \"model_name\": \"<string>\",\n \"sample_primary_key_ids\": [\n \"<string>\"\n ]\n }\n ],\n \"start_integrity_window_at\": \"2023-11-07T05:31:56Z\",\n \"end_integrity_window_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<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.prequel.co/destinations/{destination_id}/data-integrity")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"models\": [\n {\n \"model_name\": \"<string>\",\n \"sample_primary_key_ids\": [\n \"<string>\"\n ]\n }\n ],\n \"start_integrity_window_at\": \"2023-11-07T05:31:56Z\",\n \"end_integrity_window_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prequel.co/destinations/{destination_id}/data-integrity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"models\": [\n {\n \"model_name\": \"<string>\",\n \"sample_primary_key_ids\": [\n \"<string>\"\n ]\n }\n ],\n \"start_integrity_window_at\": \"2023-11-07T05:31:56Z\",\n \"end_integrity_window_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"data": {
"job": {
"id": "<string>",
"org_schema": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"destination_id": "<string>",
"status": "<string>",
"model_ids": [
"<string>"
],
"model_sample_primary_ids": {},
"data_integrity_results": [
{
"model_name": "<string>",
"is_healthy": true,
"error_message": "<string>",
"sampling_rate": 123,
"total_rows_compared": 123,
"total_rows_stale": 123,
"total_rows_pending": 123,
"total_rows_missing": 123,
"total_rows_incorrect": 123,
"total_rows_orphaned": 123,
"mismatched_partitions": [
{
"source_row_count": 123,
"destination_row_count": 123,
"last_modified_lower_bound_epoch": 123,
"last_modified_upper_bound_epoch": 123
}
]
}
],
"log_message": "<string>"
}
},
"message": "<string>"
}{
"status": "<string>",
"message": "<string>",
"data": null
}{
"status": "<string>",
"message": "<string>",
"data": null
}{
"status": "<string>",
"message": "<string>",
"data": null
}{
"status": "<string>",
"message": "<string>",
"data": null
}Authorizations
Path Parameters
Destination ID.
Body
application/json
Specifies models to run. Include sample primary keys to specify specific rows to check.
Show child attributes
Show child attributes
Last Modified Epoch to use as a lower bound to queries
Last Modified Epoch to use as a upper bound to queries
⌘I