curl --request GET \
--url https://prod.api.elementary-data.com/public/beta/{env_id}/tests/{test_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://prod.api.elementary-data.com/public/beta/{env_id}/tests/{test_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}/tests/{test_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}/tests/{test_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}/tests/{test_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}/tests/{test_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.api.elementary-data.com/public/beta/{env_id}/tests/{test_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{
"definition_type": "not_null",
"disabled": true,
"id": "<string>",
"name": "<string>",
"severity": "ERROR",
"source_type": "dbt",
"test_type": "dbt_test",
"asset_id": "<string>",
"column_name": "<string>",
"config": {},
"deleted_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"owners": [],
"path": "<string>",
"project": "<string>",
"synced_at": "2023-11-07T05:31:56Z",
"tags": [],
"updated_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 test
Fetches a single test by id, including disabled tests. Returns 404 if it doesn’t exist in this environment.
curl --request GET \
--url https://prod.api.elementary-data.com/public/beta/{env_id}/tests/{test_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://prod.api.elementary-data.com/public/beta/{env_id}/tests/{test_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}/tests/{test_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}/tests/{test_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}/tests/{test_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}/tests/{test_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.api.elementary-data.com/public/beta/{env_id}/tests/{test_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{
"definition_type": "not_null",
"disabled": true,
"id": "<string>",
"name": "<string>",
"severity": "ERROR",
"source_type": "dbt",
"test_type": "dbt_test",
"asset_id": "<string>",
"column_name": "<string>",
"config": {},
"deleted_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"owners": [],
"path": "<string>",
"project": "<string>",
"synced_at": "2023-11-07T05:31:56Z",
"tags": [],
"updated_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
Test identifier.
Environment identifier that scopes the request.
Response
Successful Response
Extensible enum. The test's name in the source system — dbt test name for dbt tests, test type for Elementary tests.
"not_null"
"unique"
"volume_anomalies"
"source_freshness"
Whether the test is disabled. A full scan omits disabled tests unless disabled=true is passed; the synced_since and deleted_since feeds always include them, so a sync observes a test being disabled.
Unique test identifier.
Test name.
Configured severity of the test.
"ERROR"
"WARNING"
Extensible enum. Integration that synced this test. New values may be added over time.
"dbt"
"elementary_cloud"
"python_sdk"
Extensible enum. Elementary's category for the test. New values may be added over time.
"dbt_test"
"anomaly_detection"
"schema_change"
"source_freshness"
"elementary_cloud"
ID of the asset this test runs on, when known.
Column the test runs on, for column-level tests.
Test configuration as defined in the source system.
Soft-delete timestamp. Present only in the deleted_since feed.
Description from the source platform.
Owners assigned to the test.
Logical path of the test in its project tree.
Project the test belongs to, when known.
When Elementary last synced this test definition. Bumped by definition changes only — new executions do not bump it. Use with synced_since for incremental reads.
Tags assigned to the test.
When the test definition was last updated in the source platform.

