Get Doc
curl --request GET \
--url https://api.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data include_elements=true \
--data include_binary=falseimport requests
url = "https://api.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}"
payload = {
"include_elements": "true",
"include_binary": "false"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.get(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({include_elements: 'true', include_binary: 'false'})
};
fetch('https://api.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}', 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.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "include_elements=true&include_binary=false",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}"
payload := strings.NewReader("include_elements=true&include_binary=false")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("include_elements=true&include_binary=false")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}")
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/x-www-form-urlencoded'
request.body = "include_elements=true&include_binary=false"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"elements": [],
"properties": {},
"binary_data": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Document
Get Doc
Get a document from a DocSet.
Args: docset_id: The ID of the DocSet doc_id: The ID of the document
Returns: Document: Document data including elements, embeddings, metadata, and binary data
GET
/
v1
/
storage
/
docsets
/
{docset_id}
/
docs
/
{doc_id}
Get Doc
curl --request GET \
--url https://api.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data include_elements=true \
--data include_binary=falseimport requests
url = "https://api.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}"
payload = {
"include_elements": "true",
"include_binary": "false"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.get(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({include_elements: 'true', include_binary: 'false'})
};
fetch('https://api.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}', 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.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => "include_elements=true&include_binary=false",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}"
payload := strings.NewReader("include_elements=true&include_binary=false")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
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.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("include_elements=true&include_binary=false")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aryn.cloud/v1/storage/docsets/{docset_id}/docs/{doc_id}")
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/x-www-form-urlencoded'
request.body = "include_elements=true&include_binary=false"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"elements": [],
"properties": {},
"binary_data": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/x-www-form-urlencoded
Response
Successful Response
Was this page helpful?
⌘I
