List a document's topics
curl --request GET \
--url https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics', 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.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics",
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.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics"
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.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics")
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{
"request_id": "<string>",
"data": {
"topics": [
{
"id": "<string>",
"name": "<string>",
"doc_id": "",
"kb_id": "",
"type": "section",
"depth": 0,
"seq": 0,
"parent_id": "<string>",
"summary": "",
"content": "<string>",
"tag_ids": [
"<string>"
],
"version": 0,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Topics
List a document's topics
List a document’s topic tree — the sections an LLM extracted from it.
The list is flat and already in depth-first order; build the tree from each item’s parent_id.
- It includes one synthetic document-root item (
type“root”), so it returns exactly one more item than the document’stopic_count, which counts real topics only. - Bodies are omitted by default. Ask for
contentinincludeto hydrate every item — that can enlarge the response by orders of magnitude.
GET
/
api
/
v2
/
knowledge_bases
/
{kb_id}
/
documents
/
{doc_id}
/
topics
List a document's topics
curl --request GET \
--url https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics', 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.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics",
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.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics"
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.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evermind.ai/api/v2/knowledge_bases/{kb_id}/documents/{doc_id}/topics")
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{
"request_id": "<string>",
"data": {
"topics": [
{
"id": "<string>",
"name": "<string>",
"doc_id": "",
"kb_id": "",
"type": "section",
"depth": 0,
"seq": 0,
"parent_id": "<string>",
"summary": "",
"content": "<string>",
"tag_ids": [
"<string>"
],
"version": 0,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}{}{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{}{}Authorizations
API key issued by EverOS, sent as Authorization: Bearer <api_key>.
Query Parameters
Extra fields to hydrate, e.g. include=content for full bodies
Was this page helpful?

