chunk-lineages
Get Chunk Lineage Handler
Get lineage graph for a chunk.
Traverses both ancestors and descendants up to max_depth, returning enriched nodes and edges.
GET
/
v1
/
chunk-lineages
/
{chunk_id}
Get Chunk Lineage Handler
curl --request GET \
--url http://localhost:8000/v1/chunk-lineages/{chunk_id}import requests
url = "http://localhost:8000/v1/chunk-lineages/{chunk_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/v1/chunk-lineages/{chunk_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_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/chunk-lineages/{chunk_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:8000/v1/chunk-lineages/{chunk_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/v1/chunk-lineages/{chunk_id}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/chunk-lineages/{chunk_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"nodes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "<string>",
"chunk_metadata": {
"polygons": [
{
"page": 123,
"polygon": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
}
}
],
"s3_urls": [
"<string>"
],
"summary": "<string>",
"extracted_text_s3_uri": "<string>",
"sheet_name": "<string>",
"block_type": "<string>",
"source_uri": "<string>",
"enriched_html": "<string>",
"cell_range": "<string>",
"dependency_summary": {},
"formulas": [
{}
],
"key_cells": [
{}
],
"named_ranges": [
{}
]
},
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"edges": [
{
"parent_chunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Headers
Path Parameters
Query Parameters
Required range:
1 <= x <= 10Cookies
⌘I
Get Chunk Lineage Handler
curl --request GET \
--url http://localhost:8000/v1/chunk-lineages/{chunk_id}import requests
url = "http://localhost:8000/v1/chunk-lineages/{chunk_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/v1/chunk-lineages/{chunk_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_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/v1/chunk-lineages/{chunk_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:8000/v1/chunk-lineages/{chunk_id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/v1/chunk-lineages/{chunk_id}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/v1/chunk-lineages/{chunk_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"nodes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"content": "<string>",
"chunk_metadata": {
"polygons": [
{
"page": 123,
"polygon": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
}
}
],
"s3_urls": [
"<string>"
],
"summary": "<string>",
"extracted_text_s3_uri": "<string>",
"sheet_name": "<string>",
"block_type": "<string>",
"source_uri": "<string>",
"enriched_html": "<string>",
"cell_range": "<string>",
"dependency_summary": {},
"formulas": [
{}
],
"key_cells": [
{}
],
"named_ranges": [
{}
]
},
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"edges": [
{
"parent_chunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}