GET/api/v1/documents/{doc_id}/content
Download a document's stored file
Stream the stored file for a document, authorized per request.<br/><br/>This is the authenticated replacement for handing out public bucket URLs<br/>(KUM-1315): the objects become private, and callers read them through here<br/>so that access is re-checked every time rather than living forever in a URL.
PARAMETERS
- doc_idpath · stringREQUIRED
- Document id.e.g. string
REQUEST
curl "https://gateway.kumkuat.ai/api/v1/documents/string/content" \ -H "X-API-Key: YOUR_KEY"
import requests
r = requests.get("https://gateway.kumkuat.ai/api/v1/documents/string/content", headers={"X-API-Key": "YOUR_KEY"})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://gateway.kumkuat.ai/api/v1/documents/string/content", {
headers: { "X-API-Key": "YOUR_KEY" }
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
