List Collections Api
curl --request GET \
--url https://api.example.com/api/kb/collections \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/kb/collections"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/kb/collections', 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.example.com/api/kb/collections",
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.example.com/api/kb/collections"
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.example.com/api/kb/collections")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/kb/collections")
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{
"status": "<string>",
"total_count": 123,
"message": "<string>",
"collections": [
{
"name": "<string>",
"schema_version": "1.0.0",
"embedding_model_id": "<string>",
"embedding_dimension": 1,
"rerank_model_id": "<string>",
"documents": 0,
"processed_documents": 0,
"parses": 0,
"chunks": 0,
"embeddings": 0,
"document_names": [
"<string>"
],
"document_metadata": [
{
"filename": "<string>",
"file_id": "<string>",
"doc_id": "<string>"
}
],
"owners": [
123
],
"collection_locked": false,
"allow_mixed_parse_methods": false,
"skip_config_validation": false,
"ingestion_config": {
"deepdoc_processing_mode": "<string>",
"deepdoc_parallel_threads": 2,
"deepdoc_reserve_cpu": 1,
"deepdoc_limiter_capacity": 2,
"deepdoc_pipeline_monitor": true,
"deepdoc_pipeline_s1_workers": 2,
"deepdoc_gpu_sessions": 1,
"embedding_base_url": "<string>",
"embedding_api_key": "<string>",
"embedding_timeout_sec": 1,
"rerank_model_id": "<string>",
"parse_method": "default",
"chunk_strategy": "recursive",
"chunk_method": "<string>",
"chunk_size": 1000,
"chunk_overlap": 200,
"headers_to_split_on": [
[
"<string>",
"<string>"
]
],
"separators": [
"<string>"
],
"use_token_count": false,
"tiktoken_encoding": "cl100k_base",
"enable_protected_content": true,
"protected_patterns": [
"<string>"
],
"table_context_size": 0,
"image_context_size": 0,
"embedding_model_id": "<string>",
"collection_locked": false,
"allow_mixed_parse_methods": false,
"skip_config_validation": false,
"embedding_batch_size": 10,
"embedding_concurrent": 10,
"embedding_use_async": false,
"max_retries": 3,
"retry_delay": 1
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_accessed_at": "2023-11-07T05:31:56Z",
"extra_metadata": {}
}
],
"warnings": [
"<string>"
]
}Knowledge Base
List Collections Api
List all collections with their statistics.
GET
/
api
/
kb
/
collections
List Collections Api
curl --request GET \
--url https://api.example.com/api/kb/collections \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/kb/collections"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/kb/collections', 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.example.com/api/kb/collections",
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.example.com/api/kb/collections"
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.example.com/api/kb/collections")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/kb/collections")
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{
"status": "<string>",
"total_count": 123,
"message": "<string>",
"collections": [
{
"name": "<string>",
"schema_version": "1.0.0",
"embedding_model_id": "<string>",
"embedding_dimension": 1,
"rerank_model_id": "<string>",
"documents": 0,
"processed_documents": 0,
"parses": 0,
"chunks": 0,
"embeddings": 0,
"document_names": [
"<string>"
],
"document_metadata": [
{
"filename": "<string>",
"file_id": "<string>",
"doc_id": "<string>"
}
],
"owners": [
123
],
"collection_locked": false,
"allow_mixed_parse_methods": false,
"skip_config_validation": false,
"ingestion_config": {
"deepdoc_processing_mode": "<string>",
"deepdoc_parallel_threads": 2,
"deepdoc_reserve_cpu": 1,
"deepdoc_limiter_capacity": 2,
"deepdoc_pipeline_monitor": true,
"deepdoc_pipeline_s1_workers": 2,
"deepdoc_gpu_sessions": 1,
"embedding_base_url": "<string>",
"embedding_api_key": "<string>",
"embedding_timeout_sec": 1,
"rerank_model_id": "<string>",
"parse_method": "default",
"chunk_strategy": "recursive",
"chunk_method": "<string>",
"chunk_size": 1000,
"chunk_overlap": 200,
"headers_to_split_on": [
[
"<string>",
"<string>"
]
],
"separators": [
"<string>"
],
"use_token_count": false,
"tiktoken_encoding": "cl100k_base",
"enable_protected_content": true,
"protected_patterns": [
"<string>"
],
"table_context_size": 0,
"image_context_size": 0,
"embedding_model_id": "<string>",
"collection_locked": false,
"allow_mixed_parse_methods": false,
"skip_config_validation": false,
"embedding_batch_size": 10,
"embedding_concurrent": 10,
"embedding_use_async": false,
"max_retries": 3,
"retry_delay": 1
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_accessed_at": "2023-11-07T05:31:56Z",
"extra_metadata": {}
}
],
"warnings": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200 - application/json
Successful Response
Response payload for the list collections operation.
Operation status: success|error
Number of collections discovered
Human-readable status message
Collection statistics
Show child attributes
Show child attributes
Non-fatal issues encountered during aggregation
⌘I

