Skip to main content

Document Download

Objective

This operation handles secure, asynchronous downloading of documents from a DataRoom. It ensures that any necessary processing—such as permission validation, watermarking, and encryption—is applied before the file is made available.

The download process involves the following steps:

  1. Initiate the Download Request: call the initiateDataRoomDocumentDownload mutation to begin the download process. This creates a download request and triggers the backend to prepare the document. Processing steps may include:
    • Permission checks
    • Watermarking
    • Encryption
Note

The document is not immediately available for download after this step.

  1. Poll for Download Status: use the dataRoomDocumentDownload query to poll the status of the download request. This query provides:

    • The current DocumentTransferStatus (PENDING, PROCESSING, COMPLETED, or FAILED)
    • Timestamps for each stage
    • A downloadPresignedUrl once the file is ready
  2. Download the File: once the DocumentTransferStatus becomes COMPLETED, the downloadPresignedUrl is available in the response. The client can then use this secure URL to download the prepared file directly from storage.

    If the status becomes FAILED, inspect the failureReason field for more details.

Initiate Document Download

Initiates the asynchronous download process for a document. This mutation creates a download request and triggers the system to prepare the file (e.g., perform permission checks, apply watermarking, encryption, etc.).

info

This operation require the DataRoom-scoped token.

mutation InitiateDataRoomDocumentDownload {
initiateDataRoomDocumentDownload(
input: { documentId: "RGF0YVJvb21Eb2N1bWVudDo2NzM5NDoyMzcwMjcx" }
) {
download {
id
status
createdAt
updatedAt
expiresAt
failureReason
}
}
}

Get Document Download Status

Retrieves the status and details of a document download request by its unique ID. This is used to track the progress of an asynchronous download operation.

info

This operation require the DataRoom-scoped token.

query GetDownloadStatus {
dataRoomDocumentDownload(
id: "RGF0YVJvb21Eb2N1bWVudERvd25sb2FkOjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMA=="
) {
id
status
downloadPresignedUrl
expiresAt
failureReason
document {
id
name
file {
extension
}
}
}
}