curl --request GET \
--url https://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}', 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://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"duration_seconds": 123,
"failure_count": 123,
"id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"status": "PASS",
"sub_test_unique_id": "<string>",
"sub_type": "<string>",
"test_id": "<string>",
"column_name": "<string>",
"description": "<string>",
"exception": "<string>",
"quality_dimension": "completeness",
"result_reason": "PERMISSIONS_ERROR",
"synced_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Get a latest test execution
Fetches the most recent execution of a single sub-test by its sub_test_unique_id. Returns 404 if it doesn’t exist in this environment or its test was deleted.
curl --request GET \
--url https://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}', 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://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.api.elementary-data.com/public/beta/{env_id}/latest-test-executions/{sub_test_unique_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"duration_seconds": 123,
"failure_count": 123,
"id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"status": "PASS",
"sub_test_unique_id": "<string>",
"sub_type": "<string>",
"test_id": "<string>",
"column_name": "<string>",
"description": "<string>",
"exception": "<string>",
"quality_dimension": "completeness",
"result_reason": "PERMISSIONS_ERROR",
"synced_at": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Personal or account token.
Path Parameters
Sub-test identifier (sub_test_unique_id).
Environment identifier that scopes the request.
Response
Successful Response
How long the execution took.
Number of failed rows or detected issues.
Identifier of this execution.
When the execution started.
Extensible enum. Result of the execution. New values may be added over time.
"PASS"
"WARN"
"FAIL"
"ERROR"
"SKIPPED"
"NO_DATA"
Stable identifier of the sub-test (a test can explode into several sub-tests, e.g. one per column). Use it to key latest executions.
Sub-test type within the test (e.g. the anomaly type checked).
ID of the test that produced this execution.
Column this execution checked, when applicable.
Description of the test at execution time.
Error message when the execution errored.
Extensible enum. Data-quality dimension the test covers, when classified.
"completeness"
Extensible enum. Why the execution produced its status, when Elementary could determine it.
"PERMISSIONS_ERROR"
When Elementary last synced this execution.

