Documents
GET/Documents/{documentId}
REST onlyFull license only
Downloads a document, such as a published PDF report, as a base64-encoded string. Get document ids from GET /PublishedReports/{id}.
Parameters
| Name | In | Type | Description | |
|---|---|---|---|---|
documentId | path | string | required | The documentID of a published report. |
tenantId | query | string | optional | Tenant to query, from /Tenants. Default: your user's main tenant. |
Example request
Decode the document field and write the bytes to a file.
Response
| Field | Type | Description |
|---|---|---|
id | string | The document id you requested. |
fileExt | string | File format of the document. |
document | string | File contents, base64-encoded. |
Large responses
Base64 adds about a third to the file size. Allow a generous timeout and avoid loading many documents into memory at once.
Errors
| Status | Body |
|---|---|
404 | Problem details with "title": "Not Found". The document does not exist or your user cannot access it. |
400 | "The user does not have access to this tenant or the tenant does not exist." |
Plus the common 401 and 429 responses. See Errors.