Get Document By Urn
curl --request GET \
--url http://localhost:8080/v1/documents/{urn}import requests
url = "http://localhost:8080/v1/documents/{urn}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8080/v1/documents/{urn}', 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/documents/{urn}",
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/documents/{urn}"
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/documents/{urn}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/v1/documents/{urn}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"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": {}
}Documents
Get Document By Urn
Read a document by the urn a search result or trigger delivery carries.
Returns the document as stored: the normalized fields, the provider’s original record under
metadata.raw, and for binary-backed documents a raw_object_* descriptor of the original
file. No connection or resource is needed; the URN alone locates the document.
GET
/
v1
/
documents
/
{urn}
Get Document By Urn
curl --request GET \
--url http://localhost:8080/v1/documents/{urn}import requests
url = "http://localhost:8080/v1/documents/{urn}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8080/v1/documents/{urn}', 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/documents/{urn}",
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/documents/{urn}"
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/documents/{urn}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/v1/documents/{urn}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"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": {}
}Path Parameters
Response
Successful Response
Was this page helpful?