Get workflow quality metrics
curl --request GET \
--url https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics \
--header 'x-api-key: <api-key>'import requests
url = "https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics', 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.kadoa.com/v4/workflows/{workflowId}/quality-metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"results": {
"COMPLETENESS": {
"key": "COMPLETENESS",
"message": "<string>",
"data": {
"score": 50,
"actualRowCount": 123,
"expectedRowCount": 123,
"cappedByLimit": true,
"signals": [
{
"totalCount": 123,
"description": "<string>",
"sources": [
{
"count": 123,
"xpath": "<string>",
"regex": "<string>",
"source": "<string>",
"url": "<string>"
}
]
}
]
}
},
"SCHEMA_VALIDATION": {
"key": "SCHEMA_VALIDATION",
"message": "<string>",
"data": {
"score": 50,
"ruleViolationCount": 123,
"rowViolationCount": 123,
"columns": [
{
"name": "<string>",
"score": 123,
"rulesConfigured": true,
"violations": [
{}
]
}
]
}
},
"SEMANTIC_PLAUSIBILITY": {
"key": "SEMANTIC_PLAUSIBILITY",
"message": "<string>",
"data": {
"score": 50,
"columns": [
{
"name": "<string>",
"score": 123,
"flaggedPercent": 123,
"reasoning": "<string>",
"flaggedExamples": [
{
"value": "<string>"
}
]
}
]
}
}
},
"issueCount": 123
}Workflows
Get workflow quality metrics
Returns the data quality metric results for a workflow run, plus the run’s total data quality issue count.
Metrics are only available once the run has finished, before that the endpoint returns
{ "results": null, "issueCount": null }.
Each metric result carries a status:
OK: the metric was computed, seedatafor it’s details.PENDING: the metric has not been computed yet.NOT_APPLICABLE: the metric cannot be computed for this workflow, seemessage.ERROR: the metric computation failed, seemessage.
GET
/
v4
/
workflows
/
{workflowId}
/
quality-metrics
Get workflow quality metrics
curl --request GET \
--url https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics \
--header 'x-api-key: <api-key>'import requests
url = "https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics', 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.kadoa.com/v4/workflows/{workflowId}/quality-metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kadoa.com/v4/workflows/{workflowId}/quality-metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"results": {
"COMPLETENESS": {
"key": "COMPLETENESS",
"message": "<string>",
"data": {
"score": 50,
"actualRowCount": 123,
"expectedRowCount": 123,
"cappedByLimit": true,
"signals": [
{
"totalCount": 123,
"description": "<string>",
"sources": [
{
"count": 123,
"xpath": "<string>",
"regex": "<string>",
"source": "<string>",
"url": "<string>"
}
]
}
]
}
},
"SCHEMA_VALIDATION": {
"key": "SCHEMA_VALIDATION",
"message": "<string>",
"data": {
"score": 50,
"ruleViolationCount": 123,
"rowViolationCount": 123,
"columns": [
{
"name": "<string>",
"score": 123,
"rulesConfigured": true,
"violations": [
{}
]
}
]
}
},
"SEMANTIC_PLAUSIBILITY": {
"key": "SEMANTIC_PLAUSIBILITY",
"message": "<string>",
"data": {
"score": 50,
"columns": [
{
"name": "<string>",
"score": 123,
"flaggedPercent": 123,
"reasoning": "<string>",
"flaggedExamples": [
{
"value": "<string>"
}
]
}
]
}
}
},
"issueCount": 123
}Authorizations
ApiKeyAuthBearerAuth
API key for authentication
Path Parameters
ID of the workflow to retrieve quality metrics for
Query Parameters
ID of a specific run. Omit to use the latest run.
Response
Quality metric results. results and issueCount are null until the run has finished.
⌘I