Get Dataset Lineage
curl --request GET \
--url https://api.truthlocks.com/v1/datasets/lineage/{datasetId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.truthlocks.com/v1/datasets/lineage/{datasetId}"
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.truthlocks.com/v1/datasets/lineage/{datasetId}', 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.truthlocks.com/v1/datasets/lineage/{datasetId}",
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.truthlocks.com/v1/datasets/lineage/{datasetId}"
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.truthlocks.com/v1/datasets/lineage/{datasetId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/datasets/lineage/{datasetId}")
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{
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineage": [
{
"transformation": "<string>",
"source_dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Datasets & Models
Get Dataset Lineage
Retrieve the full lineage graph for a dataset, including upstream sources and downstream consumers.
GET
/
v1
/
datasets
/
lineage
/
{datasetId}
Get Dataset Lineage
curl --request GET \
--url https://api.truthlocks.com/v1/datasets/lineage/{datasetId} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.truthlocks.com/v1/datasets/lineage/{datasetId}"
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.truthlocks.com/v1/datasets/lineage/{datasetId}', 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.truthlocks.com/v1/datasets/lineage/{datasetId}",
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.truthlocks.com/v1/datasets/lineage/{datasetId}"
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.truthlocks.com/v1/datasets/lineage/{datasetId}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.truthlocks.com/v1/datasets/lineage/{datasetId}")
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{
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineage": [
{
"transformation": "<string>",
"source_dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Returns the complete lineage graph for a dataset attestation. The graph represents the provenance chain as a directed acyclic graph (DAG) of dataset and model references connected by transformation relationships.
Use dataset lineage to audit data provenance, verify that training data sources are trusted, and trace how raw data flows through preprocessing pipelines into model training.
Authentication
string
required
API key with
datasets:read scope. Alternatively, pass a Bearer JWT token in
the Authorization header.string
required
Tenant identifier for multi-tenant isolation.
Path Parameters
string
required
Dataset attestation identifier (
maip-ds:ULID).Response
string
The root dataset identifier for this lineage query.
array
Array of lineage nodes. Each node contains: -
id (string) — Resource
identifier (maip-ds:... or maip-model:...) - type (string) — Node type:
dataset or model - name (string) — Human-readable name - version
(string) — Resource version - status (string) — Current attestation statuscreated_at(string) — ISO 8601 timestamp
array
Array of transformation relationships connecting nodes. Each edge contains: -
source (string) — Source node identifier - target (string) — Target node
identifier - relationship (string) — Transformation type (e.g.
derived_from, trained_on, preprocessed_from, merged_from) - metadata
(object) — Optional edge metadata (e.g. transformation parameters)
