List Missing Chunks
Lists the chunks a query run expected but could not use, one entry per chunk. An empty data with truncated: false means the run recorded none.
The entries carry the reason and the entry’s metadata, not the missing text. To read the text, use Get Query Record and inspect steps[].metadata.evidenceBundle.missingEvidence.
For how to read a run’s chunks, conflicts, and missing chunks together, see Investigate an Answer.
curl --request GET \
--url https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing', 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_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing",
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://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing"
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://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing")
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{
"consistency_class": null,
"data": [
{
"kind": "resource",
"metadata": {
"availability": "available",
"reason": "permission-filtered"
},
"name": "missing-1",
"path": "/queries/3c9e3b1a-2f0a-4b7d-9d3e-1f2a3b4c5d6e/missing/1",
"resource_type": "evidence",
"target_id": "d4c6e8a0-2b4d-4e6f-8a0c-2e4f6a8b0c2d",
"version": null
}
],
"next_cursor": null,
"path": "/queries/3c9e3b1a-2f0a-4b7d-9d3e-1f2a3b4c5d6e/missing",
"preview": null,
"truncated": false
}Authorizations
Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).
Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).
Path Parameters
Knowledge base ID: the last segment of the Service API endpoint shown in the knowledge base's API Access dialog (…/knowledge-fs/spaces/<knowledge base ID>), and the segment after /datasets/new/ in the address bar.
Query record ID: the x-query-run-id response header of Run Query, or id from List Query Records.
Query Parameters
Cursor from the previous page's next_cursor. Entries are addressed by offset, so 0 starts from the first entry.
1 - 1000Entries per page.
1 <= x <= 100Response
One page of missing-chunk entries:
nameismissing-<n>.target_idis the expected chunk ID when recorded, else the entry name.resource_typeisevidence.
Always null in these views.
Entries of this page, in the order the run recorded them.
Show child attributes
Show child attributes
Cursor for the next page, or null on the last page. Send it back as cursor.
Internal path of the view, for example /queries/<query_record_id>/evidence. Informational. This API does not serve it.
Always null in these views.
true when more entries exist beyond this page. Follow next_cursor to read them.
Was this page helpful?
curl --request GET \
--url https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing', 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_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing",
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://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing"
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://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/knowledge-fs/spaces/{knowledge_base_id}/traces/{query_record_id}/missing")
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{
"consistency_class": null,
"data": [
{
"kind": "resource",
"metadata": {
"availability": "available",
"reason": "permission-filtered"
},
"name": "missing-1",
"path": "/queries/3c9e3b1a-2f0a-4b7d-9d3e-1f2a3b4c5d6e/missing/1",
"resource_type": "evidence",
"target_id": "d4c6e8a0-2b4d-4e6f-8a0c-2e4f6a8b0c2d",
"version": null
}
],
"next_cursor": null,
"path": "/queries/3c9e3b1a-2f0a-4b7d-9d3e-1f2a3b4c5d6e/missing",
"preview": null,
"truncated": false
}