List documents
curl --request GET \
--url https://api.intelligence.io.solutions/api/r2r/v3/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": "<string>",
"offset": 0,
"limit": 100,
"include_summary_embeddings": false,
"owner_only": false
}
'import requests
url = "https://api.intelligence.io.solutions/api/r2r/v3/documents"
payload = {
"ids": "<string>",
"offset": 0,
"limit": 100,
"include_summary_embeddings": False,
"owner_only": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: '<string>',
offset: 0,
limit: 100,
include_summary_embeddings: false,
owner_only: false
})
};
fetch('https://api.intelligence.io.solutions/api/r2r/v3/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.intelligence.io.solutions/api/r2r/v3/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'ids' => '<string>',
'offset' => 0,
'limit' => 100,
'include_summary_embeddings' => false,
'owner_only' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.intelligence.io.solutions/api/r2r/v3/documents"
payload := strings.NewReader("{\n \"ids\": \"<string>\",\n \"offset\": 0,\n \"limit\": 100,\n \"include_summary_embeddings\": false,\n \"owner_only\": false\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.intelligence.io.solutions/api/r2r/v3/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": \"<string>\",\n \"offset\": 0,\n \"limit\": 100,\n \"include_summary_embeddings\": false,\n \"owner_only\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.intelligence.io.solutions/api/r2r/v3/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": \"<string>\",\n \"offset\": 0,\n \"limit\": 100,\n \"include_summary_embeddings\": false,\n \"owner_only\": false\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"collection_ids": [
"123e4567-e89b-12d3-a456-426614174000"
],
"owner_id": "123e4567-e89b-12d3-a456-426614174000",
"document_type": "pdf",
"metadata": {
"title": "Sample Document"
},
"version": "1.0",
"title": "Sample Document",
"size_in_bytes": 123456,
"ingestion_status": "pending",
"extraction_status": "pending",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z",
"ingestion_attempt_number": 0,
"summary": "A summary of the document",
"summary_embedding": [
0.1,
0.2,
0.3
],
"total_tokens": 1000
}
],
"total_entries": 1
}{}{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}Documents
List documents
Returns a paginated list of documents the authenticated user has access to.
GET
/
api
/
r2r
/
v3
/
documents
List documents
curl --request GET \
--url https://api.intelligence.io.solutions/api/r2r/v3/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": "<string>",
"offset": 0,
"limit": 100,
"include_summary_embeddings": false,
"owner_only": false
}
'import requests
url = "https://api.intelligence.io.solutions/api/r2r/v3/documents"
payload = {
"ids": "<string>",
"offset": 0,
"limit": 100,
"include_summary_embeddings": False,
"owner_only": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ids: '<string>',
offset: 0,
limit: 100,
include_summary_embeddings: false,
owner_only: false
})
};
fetch('https://api.intelligence.io.solutions/api/r2r/v3/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.intelligence.io.solutions/api/r2r/v3/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'ids' => '<string>',
'offset' => 0,
'limit' => 100,
'include_summary_embeddings' => false,
'owner_only' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.intelligence.io.solutions/api/r2r/v3/documents"
payload := strings.NewReader("{\n \"ids\": \"<string>\",\n \"offset\": 0,\n \"limit\": 100,\n \"include_summary_embeddings\": false,\n \"owner_only\": false\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.intelligence.io.solutions/api/r2r/v3/documents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": \"<string>\",\n \"offset\": 0,\n \"limit\": 100,\n \"include_summary_embeddings\": false,\n \"owner_only\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.intelligence.io.solutions/api/r2r/v3/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": \"<string>\",\n \"offset\": 0,\n \"limit\": 100,\n \"include_summary_embeddings\": false,\n \"owner_only\": false\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"collection_ids": [
"123e4567-e89b-12d3-a456-426614174000"
],
"owner_id": "123e4567-e89b-12d3-a456-426614174000",
"document_type": "pdf",
"metadata": {
"title": "Sample Document"
},
"version": "1.0",
"title": "Sample Document",
"size_in_bytes": 123456,
"ingestion_status": "pending",
"extraction_status": "pending",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z",
"ingestion_attempt_number": 0,
"summary": "A summary of the document",
"summary_embedding": [
0.1,
0.2,
0.3
],
"total_tokens": 1000
}
],
"total_entries": 1
}{}{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}Results can be filtered by providing specific document IDs. Regular users will only see documents they own or have access to through collections. Superusers can see all documents. The documents are returned in order of last modification, with most recent first.
Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
A list of document IDs to retrieve. If not provided, all documents will be returned.
Specifies the number of objects to skip. Defaults to 0.
Specifies a limit on the number of objects to return, ranging between 1 and 100. Defaults to 100.
Specifies whether or not to include embeddings of each document summary.
If true, only returns documents owned by the user, not all accessible documents.
Was this page helpful?
⌘I