Overview#
Receive real-time notifications containing download links for data requested via data tokens.Data Download Messages#
Message Type: X-DPT-CAB-REQUEST-IDMessage Structure#
{
"data": {
"type": "X-DPT-CAB-REQUEST-ID",
"id": "b24b68f6-ef45-486a-bb4a-e58125b83a11",
"data_context": "data-token-context",
"output_type": 1,
"body": "https://download-server.example.com/path?auth=token"
}
}
Message Fields#
| Field | Description |
|---|
type | Message type identifier (X-DPT-CAB-REQUEST-ID) |
id | Unique request identifier returned when data was requested |
data_context | Context associated with the data token |
output_type | Type of output data |
body | Download URL or message content |
Output Type Values#
| Value | Type | Description |
|---|
0 | Message | Textual message or status update |
1 | File | Download link for requested data |
Handling Messages#
Use Case#
Data download messages eliminate the need to poll for download link availability. After requesting data via a data token, the system prepares the encrypted data and sends the download link via WebSocket as soon as it's ready.1.
Request data via token using the API
2.
API returns request identifier
3.
Subscribe to WebSocket notifications using the request ID
4.
System retrieves data from storage devices and decrypts through the chain
5.
Download link is sent via WebSocket when ready
6.
Initiate download immediately
This enables efficient data retrieval without repeatedly checking if data is available.Request IDs are unique and can be used as event identifiers
Download links include authentication tokens and are time-limited
Output type 1 indicates a file download link
Output type 0 may indicate status updates during data preparation
Download links should be used immediately as they may expire
Remove event listeners after receiving the download link