Skip to main content
GET
/
external
/
kb
/
all
Get All Knowledge Bases
curl --request GET \
  --url https://prod-api.ringg.ai/ca/api/v0/external/kb/all \
  --header 'X-API-KEY: <x-api-key>'
import requests

url = "https://prod-api.ringg.ai/ca/api/v0/external/kb/all"

headers = {"X-API-KEY": "<x-api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-KEY': '<x-api-key>'}};

fetch('https://prod-api.ringg.ai/ca/api/v0/external/kb/all', 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://prod-api.ringg.ai/ca/api/v0/external/kb/all",
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: <x-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://prod-api.ringg.ai/ca/api/v0/external/kb/all"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-KEY", "<x-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://prod-api.ringg.ai/ca/api/v0/external/kb/all")
.header("X-API-KEY", "<x-api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://prod-api.ringg.ai/ca/api/v0/external/kb/all")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<x-api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "kb_id": "550e8400-e29b-41d4-a716-446655440000",
    "kb_name": "Product Documentation",
    "type": "non_deterministic",
    "created_at": "2024-12-16T13:03:29.947147+00:00"
  }
]

Get All Knowledge Bases

Retrieve a list of all knowledge bases in your workspace with basic information about each one.
Rate Limit: Maximum 60 requests per hour per workspace

Response Format

Returns an array of knowledge base objects, each containing:
  • kb_id: Unique identifier
  • kb_name: Name of the knowledge base
  • type: Knowledge base type (e.g., “non_deterministic”)
  • created_at: Creation timestamp

Use Cases

Dashboard View

Display all knowledge bases in your application or dashboard:
const response = await fetch('https://api.ringg.ai/external/kb/all', {
  headers: { 'X-API-KEY': 'your-api-key' }
});
const knowledgeBases = await response.json();
Populate a dropdown for users to select a knowledge base when configuring agents.

Audit and Management

  • Review all knowledge bases in your workspace
  • Identify unused or outdated knowledge bases
  • Track knowledge base creation dates

Getting Detailed Information

This endpoint returns only basic information. For detailed content including files, URLs, and FAQs, use Get Knowledge Base by ID with a specific kb_id.
Pagination: Currently, this endpoint returns all knowledge bases. For workspaces with many knowledge bases, consider caching this data to reduce API calls.

Example Response

[
  {
    "kb_id": "550e8400-e29b-41d4-a716-446655440000",
    "kb_name": "Product Documentation",
    "type": "non_deterministic",
    "created_at": "2024-12-16T13:03:29.947147+00:00"
  },
  {
    "kb_id": "660e8400-e29b-41d4-a716-446655440001",
    "kb_name": "Customer Support FAQs",
    "type": "non_deterministic",
    "created_at": "2024-12-17T10:15:42.123456+00:00"
  }
]

Headers

X-API-KEY
string
required

(Required) Your Ringg AI API key.

Example:

"7251cb4b-3373-43a4-844c-b27a1d45e0c9"

Response

List of all knowledge bases retrieved successfully.

kb_id
string
Example:

"550e8400-e29b-41d4-a716-446655440000"

kb_name
string
Example:

"Product Documentation"

type
string
Example:

"non_deterministic"

created_at
string<date-time>
Example:

"2024-12-16T13:03:29.947147+00:00"