API reference

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

NameInTypeDescription
documentIdpathstringrequiredThe documentID of a published report.
tenantIdquerystringoptionalTenant to query, from /Tenants. Default: your user's main tenant.

Example request

Decode the document field and write the bytes to a file.

Response

FieldTypeDescription
idstringThe document id you requested.
fileExtstringFile format of the document.
documentstringFile 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

StatusBody
404Problem 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.