Skip to main content
GET
/
external
/
kb
/
{kb_id}
Get Knowledge Base by ID
curl --request GET \
  --url https://prod-api.ringg.ai/ca/api/v0/external/kb/{kb_id} \
  --header 'X-API-KEY: <x-api-key>'
import requests

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

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/{kb_id}', 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/{kb_id}",
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/{kb_id}"

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/{kb_id}")
.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/{kb_id}")

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",
  "status": "completed",
  "created_at": "2024-12-16T13:03:29.947147+00:00",
  "updated_at": "2024-12-16T14:15:32.123456+00:00",
  "files": [
    {
      "file_id": "<string>",
      "file_type": "<string>",
      "file_size": 123,
      "filename": "<string>",
      "file_path": "<string>"
    }
  ],
  "urls": [
    {
      "file_id": "<string>",
      "file_type": "<string>",
      "file_size": 123,
      "url": "<string>",
      "file_path": "<string>"
    }
  ],
  "faqs": [
    {
      "file_id": "<string>",
      "file_type": "<string>",
      "file_size": 123,
      "content": {}
    }
  ]
}

Get Knowledge Base by ID

Retrieve detailed information about a specific knowledge base, including all files, URLs, and FAQs along with their processing status.
Rate Limit: Maximum 60 requests per hour per workspace

Response Structure

The response includes comprehensive details about your knowledge base:

Basic Information

  • kb_id: Unique identifier
  • kb_name: Name of the knowledge base
  • status: Overall processing status (pending, processing, completed, failed)
  • created_at: Creation timestamp
  • updated_at: Last modification timestamp

Content Arrays

Files

Each file object includes:
  • file_id: Unique identifier for removal operations
  • file_type: Document type (pdf, txt, docx, etc.)
  • file_size: Size in bytes
  • filename: Original filename
  • file_path: Storage path

URLs

Each URL object includes:
  • file_id: Unique identifier for removal operations
  • file_type: Content type
  • file_size: Extracted content size
  • url: Original URL
  • file_path: Storage path for indexed content

FAQs

Each FAQ object includes:
  • file_id: Unique identifier for removal operations
  • file_type: Always “faq”
  • file_size: Content size
  • content: Question and answer object

Use Cases

  • Check Processing Status: Monitor when content is ready for use
  • Get Content IDs: Retrieve file and FAQ IDs for removal operations
  • Audit Content: Review what’s currently in your knowledge base
  • Debug Issues: Identify failed or pending items
Processing Time: Large files or many URLs may take several minutes to process. Check the status field to confirm completion.

Headers

X-API-KEY
string
required

(Required) Your Ringg AI API key.

Example:

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

Path Parameters

kb_id
string
required

(Required) ID of the knowledge base

Example:

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

Response

Knowledge base details retrieved successfully.

kb_id
string
Example:

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

kb_name
string
Example:

"Product Documentation"

status
string

Processing status of the knowledge base

Example:

"completed"

created_at
string<date-time>
Example:

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

updated_at
string<date-time>
Example:

"2024-12-16T14:15:32.123456+00:00"

files
object[]
urls
object[]
faqs
object[]