Get one retrieval-audit log with its scopes and chunk refs
GET
/
v1
/
knowledge-base
/
audit
/
retrievals
/
{ref}
Get one retrieval-audit log with its scopes and chunk refs
curl --request GET \
--url https://api-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref} \
--header 'x-api-key: <api-key>'import requests
url = "https://api-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}"
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-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}', 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-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}",
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-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}"
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-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}")
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{
"log": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"ref": "",
"retrieval_status": "<string>",
"serving_decision": "<string>",
"audit_write_status": "<string>",
"requested_kb_count": 123,
"result_count": 123,
"response_ref_count": 123,
"eligible_version_count": 123,
"duration_ms": 123,
"actor_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rag_query_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query_hash": "<string>",
"query_hash_key_version": "<string>",
"query_length_bucket": "<string>",
"request_id": "<string>",
"trace_id": "<string>",
"caller": "<string>",
"initiator_type": "<string>",
"principal_type": "<string>",
"permission": "<string>",
"permission_decision": "<string>",
"query_hash_scope": "<string>",
"query_length": 123,
"eligible_version_digest": "<string>",
"ineligible_counts_by_reason": {},
"policy_version": "<string>",
"eligibility_rule_version": "<string>",
"scan_policy_version": "<string>",
"scan_policy_decision": "<string>",
"retrieval_config_version": "<string>",
"embedding_model": "<string>",
"reranker_model": "<string>",
"top_k": 123,
"effective_limit": 123,
"ranking_mode": "<string>",
"alpha": 123,
"reranked": true,
"error_code": "<string>",
"error_category": "<string>",
"intent_recorded_at": "2023-11-07T05:31:56Z",
"finalized_at": "2023-11-07T05:31:56Z"
},
"scopes": [
{
"knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requested": true,
"eligible_version_count": 123,
"result_count": 123,
"serving_decision": "<string>",
"scan_policy_decision": "<string>",
"effective_serving_status_counts": {}
}
],
"refs": [
{
"knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chunk_index": 123,
"chunk_stable_id": "<string>",
"chunk_content_hash": "<string>",
"chunk_content_hash_key_version": "<string>",
"document_version_content_hash": "<string>",
"citation_ref": "<string>",
"source_uri_hash": "<string>",
"rank": 123,
"score": 123
}
]
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Response
Successful Response
A retrieval log plus its scopes (incl. misses/blocks) and chunk refs.
Was this page helpful?
⌘I
Get one retrieval-audit log with its scopes and chunk refs
curl --request GET \
--url https://api-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref} \
--header 'x-api-key: <api-key>'import requests
url = "https://api-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}"
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-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}', 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-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}",
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-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}"
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-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/knowledge-base/audit/retrievals/{ref}")
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{
"log": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"ref": "",
"retrieval_status": "<string>",
"serving_decision": "<string>",
"audit_write_status": "<string>",
"requested_kb_count": 123,
"result_count": 123,
"response_ref_count": 123,
"eligible_version_count": 123,
"duration_ms": 123,
"actor_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rag_query_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query_hash": "<string>",
"query_hash_key_version": "<string>",
"query_length_bucket": "<string>",
"request_id": "<string>",
"trace_id": "<string>",
"caller": "<string>",
"initiator_type": "<string>",
"principal_type": "<string>",
"permission": "<string>",
"permission_decision": "<string>",
"query_hash_scope": "<string>",
"query_length": 123,
"eligible_version_digest": "<string>",
"ineligible_counts_by_reason": {},
"policy_version": "<string>",
"eligibility_rule_version": "<string>",
"scan_policy_version": "<string>",
"scan_policy_decision": "<string>",
"retrieval_config_version": "<string>",
"embedding_model": "<string>",
"reranker_model": "<string>",
"top_k": 123,
"effective_limit": 123,
"ranking_mode": "<string>",
"alpha": 123,
"reranked": true,
"error_code": "<string>",
"error_category": "<string>",
"intent_recorded_at": "2023-11-07T05:31:56Z",
"finalized_at": "2023-11-07T05:31:56Z"
},
"scopes": [
{
"knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requested": true,
"eligible_version_count": 123,
"result_count": 123,
"serving_decision": "<string>",
"scan_policy_decision": "<string>",
"effective_serving_status_counts": {}
}
],
"refs": [
{
"knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"document_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chunk_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chunk_index": 123,
"chunk_stable_id": "<string>",
"chunk_content_hash": "<string>",
"chunk_content_hash_key_version": "<string>",
"document_version_content_hash": "<string>",
"citation_ref": "<string>",
"source_uri_hash": "<string>",
"rank": 123,
"score": 123
}
]
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"error": "<string>",
"message": "<string>",
"retryable": true,
"retry_after": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}