List Documents
curl --request GET \
--url https://platform.perso.ai/api/v1/document/ \
--header 'PersoPlatform-APIKey: <api-key>'import requests
url = "https://platform.perso.ai/api/v1/document/"
headers = {"PersoPlatform-APIKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'PersoPlatform-APIKey': '<api-key>'}};
fetch('https://platform.perso.ai/api/v1/document/', 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://platform.perso.ai/api/v1/document/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"PersoPlatform-APIKey: <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://platform.perso.ai/api/v1/document/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("PersoPlatform-APIKey", "<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://platform.perso.ai/api/v1/document/")
.header("PersoPlatform-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.perso.ai/api/v1/document/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["PersoPlatform-APIKey"] = '<api-key>'
response = http.request(request)
puts response.read_bodySession Resources
List Documents
List available documents for the organization.
Documents can be used as knowledge sources for LLM conversations in interactive sessions.
GET
/
api
/
v1
/
document
/
List Documents
curl --request GET \
--url https://platform.perso.ai/api/v1/document/ \
--header 'PersoPlatform-APIKey: <api-key>'import requests
url = "https://platform.perso.ai/api/v1/document/"
headers = {"PersoPlatform-APIKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'PersoPlatform-APIKey': '<api-key>'}};
fetch('https://platform.perso.ai/api/v1/document/', 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://platform.perso.ai/api/v1/document/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"PersoPlatform-APIKey: <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://platform.perso.ai/api/v1/document/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("PersoPlatform-APIKey", "<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://platform.perso.ai/api/v1/document/")
.header("PersoPlatform-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.perso.ai/api/v1/document/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["PersoPlatform-APIKey"] = '<api-key>'
response = http.request(request)
puts response.read_bodyAuthorizations
Response
Unauthorized - Invalid or missing authentication credentials.
⌘I

