Get collection tree with articles of a help center
curl --request GET \
--url https://helpcenter.thena.ai/collections/tree \
--header 'x-api-key: <api-key>'import requests
url = "https://helpcenter.thena.ai/collections/tree"
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://helpcenter.thena.ai/collections/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://helpcenter.thena.ai/collections/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-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://helpcenter.thena.ai/collections/tree"
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://helpcenter.thena.ai/collections/tree")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://helpcenter.thena.ai/collections/tree")
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{
"data": [
{
"_id": "682c334124b3b0d0d29b3c17",
"name": "How to setup Thena",
"slug": "8805124718-how-to-setup-thena",
"order": 0,
"articles": [
"<array>"
],
"childCollection": [
{
"_id": "682c334124b3b0d0d29b3c18",
"name": "Getting Started",
"slug": "getting-started",
"parentId": "682c334124b3b0d0d29b3c17",
"order": 0,
"icon": "BookOpenIcon",
"description": "Learn how to get started",
"depth": 1,
"articles": [],
"childCollection": []
}
],
"parentId": null,
"icon": "BookOpenIcon",
"description": "Learn how to get started with our platform",
"isProtected": false,
"depth": 0
}
],
"message": "Collections fetched successfully."
}Collections
Get collection tree with articles of a help center
GET
/
collections
/
tree
Get collection tree with articles of a help center
curl --request GET \
--url https://helpcenter.thena.ai/collections/tree \
--header 'x-api-key: <api-key>'import requests
url = "https://helpcenter.thena.ai/collections/tree"
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://helpcenter.thena.ai/collections/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://helpcenter.thena.ai/collections/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-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://helpcenter.thena.ai/collections/tree"
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://helpcenter.thena.ai/collections/tree")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://helpcenter.thena.ai/collections/tree")
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{
"data": [
{
"_id": "682c334124b3b0d0d29b3c17",
"name": "How to setup Thena",
"slug": "8805124718-how-to-setup-thena",
"order": 0,
"articles": [
"<array>"
],
"childCollection": [
{
"_id": "682c334124b3b0d0d29b3c18",
"name": "Getting Started",
"slug": "getting-started",
"parentId": "682c334124b3b0d0d29b3c17",
"order": 0,
"icon": "BookOpenIcon",
"description": "Learn how to get started",
"depth": 1,
"articles": [],
"childCollection": []
}
],
"parentId": null,
"icon": "BookOpenIcon",
"description": "Learn how to get started with our platform",
"isProtected": false,
"depth": 0
}
],
"message": "Collections fetched successfully."
}Authorizations
Enter your API key
Query Parameters
Help Center ID
Example:
"507f1f77bcf86cd799439011"
⌘I