Knowledge Domains: List Relationships
curl --request GET \
--url https://api.example.com/v0/containers/{container_id}/relationshipsimport requests
url = "https://api.example.com/v0/containers/{container_id}/relationships"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v0/containers/{container_id}/relationships', 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/v0/containers/{container_id}/relationships",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/v0/containers/{container_id}/relationships"
req, _ := http.NewRequest("GET", url, nil)
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/v0/containers/{container_id}/relationships")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/containers/{container_id}/relationships")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{}
],
"total": 123,
"limit": 123,
"offset": 123
}Knowledge Domains
Knowledge Domains: List Relationships
List relationships inferred between entities in a knowledge domain.
GET
/
v0
/
containers
/
{container_id}
/
relationships
Knowledge Domains: List Relationships
curl --request GET \
--url https://api.example.com/v0/containers/{container_id}/relationshipsimport requests
url = "https://api.example.com/v0/containers/{container_id}/relationships"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/v0/containers/{container_id}/relationships', 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/v0/containers/{container_id}/relationships",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/v0/containers/{container_id}/relationships"
req, _ := http.NewRequest("GET", url, nil)
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/v0/containers/{container_id}/relationships")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/containers/{container_id}/relationships")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{}
],
"total": 123,
"limit": 123,
"offset": 123
}Overview
Relationships are inferred from your documents and stored per container. Access is restricted to the container owner derived from yourBBOT-API-Key.
Authentication
Send your API key:string
Your BBOT API key
Path Parameters
string
required
Knowledge container id (example:
userId_expertId_knowledge_name)Query Parameters
string
Optional relationship type filter (for example:
RELATED_TO)integer
default:"200"
Max items to return (1-1000)
integer
default:"0"
Pagination offset
Response
array
Relationship entries with source, relationship, and target
integer
Total matching relationships
integer
Applied limit
integer
Applied offset
Example Request
cURL
curl --location 'https://api.b-bot.space/api/v0/containers/<container_id>/relationships?limit=5' \
--header 'BBOT-API-Key: <your-bbot-api-key>'