Files
List files
Every file of a knowledge base, newest first, with its status and progress.
GET
/
knowledge-base
/
{id}
/
files
List files
curl --request GET \
--url https://api.verbeo.ai/v1/knowledge-base/{id}/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.verbeo.ai/v1/knowledge-base/{id}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.verbeo.ai/v1/knowledge-base/{id}/files', 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.verbeo.ai/v1/knowledge-base/{id}/files",
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.verbeo.ai/v1/knowledge-base/{id}/files"
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.verbeo.ai/v1/knowledge-base/{id}/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbeo.ai/v1/knowledge-base/{id}/files")
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_bodyReturns every file of a knowledge base, newest first, as file objects. A knowledge base has at most 100 files (10 on Free), so they come in one page. A replacement on its way is listed beside the file it replaces.
Path parameters
Request
curl "https://api.verbeo.ai/v1/knowledge-base/5df09066-0842-4c92-8ef0-6cf2ff6d7455/files" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK
{
"success": true,
"data": [
{
"id": "c4ff0c9c-4b3b-4a94-a86e-3d3b64088ae0",
"store_id": "5df09066-0842-4c92-8ef0-6cf2ff6d7455",
"display_name": "prices.pdf",
"file_type": "application/pdf",
"file_size": 371989,
"status": "ready",
"error_code": null,
"error_message": null,
"chunk_count": 12,
"chunks_saved": 12,
"…": "every field of the file object"
}
],
"pagination": { "total": 1, "count": 1, "next_cursor": null }
}
Errors
| Code | Status | When |
|---|---|---|
NOT_FOUND | 404 | No such knowledge base: Knowledge base not found. |
VALIDATION_FAILED | 422 | id is not a UUID. |
Was this page helpful?
⌘I
List files
curl --request GET \
--url https://api.verbeo.ai/v1/knowledge-base/{id}/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.verbeo.ai/v1/knowledge-base/{id}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.verbeo.ai/v1/knowledge-base/{id}/files', 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.verbeo.ai/v1/knowledge-base/{id}/files",
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.verbeo.ai/v1/knowledge-base/{id}/files"
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.verbeo.ai/v1/knowledge-base/{id}/files")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbeo.ai/v1/knowledge-base/{id}/files")
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