curl --request GET \
--url https://core-api.getaptly.com/api/knowledge/tree \
--header 'x-token: <api-key>'import requests
url = "https://core-api.getaptly.com/api/knowledge/tree"
headers = {"x-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-token': '<api-key>'}};
fetch('https://core-api.getaptly.com/api/knowledge/tree', 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://core-api.getaptly.com/api/knowledge/tree",
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-token: <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://core-api.getaptly.com/api/knowledge/tree"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-token", "<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://core-api.getaptly.com/api/knowledge/tree")
.header("x-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api.getaptly.com/api/knowledge/tree")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"nodes": [
{
"_id": "<string>",
"name": "<string>",
"emoji": "<string>",
"iconUrl": "<string>",
"accessType": "public",
"parentId": "<string>",
"rank": 123,
"archived": true,
"hasChildren": true,
"matched": true,
"children": "<array>"
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Get the knowledge document tree
Returns a lazy, depth-bounded tree of knowledge documents starting at parentId
(root documents when omitted). Each node reports hasChildren so you can decide
whether to fetch further levels via GET /api/knowledge/{id}/children.
Accepts the same filter parameters as GET /api/knowledge/list (everything below
except limit/skip — parentId here keeps its tree-specific meaning, the root
to start from, not a filter). With no filter active, the response is the plain
tree with no matched field on any node. With a filter active, the tree (already
built and depth-bounded as usual) is pruned to documents that match the filter,
plus their ancestors (so a match stays reachable from the root) and their
descendants (so a matched folder’s contents stay visible) — every kept node
within the tree, matching or not, gets a matched boolean. A document that would
only appear more than depth levels below the root is never fetched, so it can’t
match either — increase depth to search deeper.
curl --request GET \
--url https://core-api.getaptly.com/api/knowledge/tree \
--header 'x-token: <api-key>'import requests
url = "https://core-api.getaptly.com/api/knowledge/tree"
headers = {"x-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-token': '<api-key>'}};
fetch('https://core-api.getaptly.com/api/knowledge/tree', 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://core-api.getaptly.com/api/knowledge/tree",
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-token: <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://core-api.getaptly.com/api/knowledge/tree"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-token", "<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://core-api.getaptly.com/api/knowledge/tree")
.header("x-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://core-api.getaptly.com/api/knowledge/tree")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"nodes": [
{
"_id": "<string>",
"name": "<string>",
"emoji": "<string>",
"iconUrl": "<string>",
"accessType": "public",
"parentId": "<string>",
"rank": 123,
"archived": true,
"hasChildren": true,
"matched": true,
"children": "<array>"
}
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Query Parameters
Omit, or pass "" / "null", for the root level.
How many levels to expand eagerly.
x <= 3Only match documents associated with this board.
Only match documents linked to this card.
Only match documents extracted from this conversation.
Case-insensitive substring match on document name. Regex metacharacters are escaped before being interpolated into the query, so the match is always literal.
Set true to match archived documents instead of active ones. Also widens tree traversal itself so archived documents (and their archived descendants) are reachable at all.
Only match documents created by this user (matches createdBy).
Only match documents last updated by this user (matches updatedBy).
Only match documents created on or after this ISO date (inclusive).
Only match documents created on or before this ISO date (inclusive).
Only match documents last updated on or after this ISO date (inclusive). Filters updatedAt only, never createdAt.
Only match documents last updated on or before this ISO date (inclusive). Filters updatedAt only, never createdAt.
Set true to match only documents with no aptletUuid, aptletInstanceId, or streamId — the knowledge base's own top-level documents ("pane 0"). Cannot be combined with aptletUuid, aptletInstanceId, or streamId.
Response
Tree of knowledge document nodes.
Show child attributes
Show child attributes