Download Document Raw
curl --request GET \
--url http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}import requests
url = "http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_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_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}",
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 := "http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}"
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("http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>""<string>"{
"error_code": "authentication_error",
"message": "Invalid or missing credentials.",
"details": {}
}{
"error_code": "permission_denied",
"message": "You do not have permission to perform this action.",
"details": {}
}{
"message": "<string>",
"error_code": "not_found",
"details": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"type": "<string>",
"detail": "<string>",
"endpoint": "<string>",
"tier": "<string>",
"limit": 123,
"remaining": 123,
"window_seconds": 123,
"retry_after": 123,
"title": "Too Many Requests",
"status": 429,
"error_code": "rate_limit_exceeded",
"instance": "<string>"
}{
"error_code": "internal_server_error",
"message": "An unexpected error occurred.",
"details": {}
}Data
Download Document Raw
Download a document as a file.
Documents ingested from a binary (a PDF, image, spreadsheet, attachment, video) keep the
original bytes alongside the extracted content. Those stream back as the file was ingested,
nothing is buffered, and a Range header resumes a partial download. An email downloads as an
RFC 822 .eml with its stored attachments and a calendar event as an iCalendar .ics, both
built from the stored record. Other documents without a binary payload return 404; read those
with the document route instead.
GET
/
v1
/
data
/
{connection_id}
/
{resource}
/
raw
/
{external_id}
Download Document Raw
curl --request GET \
--url http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}import requests
url = "http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_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_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}",
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 := "http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}"
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("http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/v1/data/{connection_id}/{resource}/raw/{external_id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"<string>""<string>"{
"error_code": "authentication_error",
"message": "Invalid or missing credentials.",
"details": {}
}{
"error_code": "permission_denied",
"message": "You do not have permission to perform this action.",
"details": {}
}{
"message": "<string>",
"error_code": "not_found",
"details": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"type": "<string>",
"detail": "<string>",
"endpoint": "<string>",
"tier": "<string>",
"limit": 123,
"remaining": 123,
"window_seconds": 123,
"retry_after": 123,
"title": "Too Many Requests",
"status": 429,
"error_code": "rate_limit_exceeded",
"instance": "<string>"
}{
"error_code": "internal_server_error",
"message": "An unexpected error occurred.",
"details": {}
}Was this page helpful?