curl -G "https://customerDomain.ambersearch.de/api/beta/document/download" \
--data-urlencode "document_id={document_id}" \
-H "Authorization: Bearer ambrs-exampletoken"
import requests
response = requests.get(
"https://customerDomain.ambersearch.de/api/beta/document/download",
params = {
"document_id": "{document_id}"
},
headers = {
"Authorization": "Bearer ambrs-exampletoken"
}
)
print(response.content)
const axios = require("axios");
axios
.get("https://customerDomain.ambersearch.de/api/beta/document/download", {
params: {
document_id: "{document_id}",
},
headers: {
Authorization: "Bearer ambrs-exampletoken",
}
})
.then((res) => console.log(res.data));
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Download document
Download a document by its ID.
This endpoint allows downloading a document’s content using its unique identifier. The response will be the actual file content with appropriate content type headers.
The document ID is passed as the document_id query parameter and must be URL-encoded. Use your HTTP client’s parameter support rather than building the query string by hand — IDs of documents from SMB / Windows file shares are file paths and may contain /, spaces and &.
Breaking change: the ID was previously part of the URL path; the old /document/{document_id}/download form is no longer supported.
curl -G "https://customerDomain.ambersearch.de/api/beta/document/download" \
--data-urlencode "document_id={document_id}" \
-H "Authorization: Bearer ambrs-exampletoken"
import requests
response = requests.get(
"https://customerDomain.ambersearch.de/api/beta/document/download",
params = {
"document_id": "{document_id}"
},
headers = {
"Authorization": "Bearer ambrs-exampletoken"
}
)
print(response.content)
const axios = require("axios");
axios
.get("https://customerDomain.ambersearch.de/api/beta/document/download", {
params: {
document_id: "{document_id}",
},
headers: {
Authorization: "Bearer ambrs-exampletoken",
}
})
.then((res) => console.log(res.data));
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}curl -G "https://customerDomain.ambersearch.de/api/beta/document/download" \
--data-urlencode "document_id={document_id}" \
-H "Authorization: Bearer ambrs-exampletoken"
import requests
response = requests.get(
"https://customerDomain.ambersearch.de/api/beta/document/download",
params = {
"document_id": "{document_id}"
},
headers = {
"Authorization": "Bearer ambrs-exampletoken"
}
)
print(response.content)
const axios = require("axios");
axios
.get("https://customerDomain.ambersearch.de/api/beta/document/download", {
params: {
document_id: "{document_id}",
},
headers: {
Authorization: "Bearer ambrs-exampletoken",
}
})
.then((res) => console.log(res.data));
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The unique identifier of the document to download, exactly as returned in the id field by /beta/search. Must be URL-encoded: ids may contain /, spaces and & -- documents from SMB / Windows file shares are identified by their file path (e.g. //fileserver01/Marketing/Report.pdf).
1"doc_123456"
Response
Successful Response