List documents currently existing in knowledge base
curl --request GET \
--url https://api.prd.rad.security/tenants/{tenant_id}/knowledge_base/documentsimport requests
url = "https://api.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents', 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.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents",
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.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents"
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.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents")
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{
"current_offset": 123,
"has_more": true,
"total_count": 123,
"entries": [
{
"id": "<string>",
"tenant_id": "<string>",
"file_name": "<string>",
"status": "<string>",
"collections": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"uploaded_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"account_id": "<string>"
}
]
}{
"status": 123,
"code": "<string>",
"request_id": "<string>",
"validation_details": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}documents
List documents currently existing in knowledge base
GET
/
tenants
/
{tenant_id}
/
knowledge_base
/
documents
List documents currently existing in knowledge base
curl --request GET \
--url https://api.prd.rad.security/tenants/{tenant_id}/knowledge_base/documentsimport requests
url = "https://api.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents', 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.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents",
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.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents"
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.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prd.rad.security/tenants/{tenant_id}/knowledge_base/documents")
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{
"current_offset": 123,
"has_more": true,
"total_count": 123,
"entries": [
{
"id": "<string>",
"tenant_id": "<string>",
"file_name": "<string>",
"status": "<string>",
"collections": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"uploaded_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"account_id": "<string>"
}
]
}{
"status": 123,
"code": "<string>",
"request_id": "<string>",
"validation_details": [
{
"code": "<string>",
"field": "<string>",
"message": "<string>",
"param": "<string>"
}
]
}Path Parameters
RAD tenant ID
Query Parameters
Number of records to return
Required range:
x >= 1Requested record offset
Required range:
x >= 0The filter query for the collection, in the form of 'key1:value1,key1:value2,key2:value3'
Response
List of documents
⌘I