Skip to content

Retrieve and Download Privacy Reports

Once data collection, curation, and approval processes are complete, the Privacy Portal compiles all discovered personal data records into a secure report file. For Access requests, privacy professionals need to retrieve these reports programmatically to securely distribute them to customers or archive them for auditing.

In this tutorial, you will learn how to programmatically check if a report is ready and download the completed privacy report using the Admin API.


You must verify that a request’s processingStage is COMPLETE or APPROVED before attempting to download the report file. If you query the report file endpoint for an active or open request that is still in the verification or collection phases, the server will return an error.

To check request status, use the Retrieve and Filter Privacy Requests endpoint to inspect the processingStage field:

{
"id": "req_841203",
"status": "APPROVED",
"processingStage": "COMPLETE"
}

To download the compiled personal data report, execute a GET request against the report file endpoint.

GET /api/prm/{tenant}/requests/{requestId}/report/file
ParameterTypeRequiredDescription
tenantStringYesYour organization’s tenant slug.
requestIdStringYesThe ID of the completed request (e.g., req_841203).

Include your programmatically generated key in the X-API-Key header (refer to the Authentication Guide on how to obtain this key):

X-API-Key: <YOUR_API_KEY>
Accept: application/octet-stream

Select your preferred language to see how to download and stream compiled report zip files programmatically:

import requests
url = "https://bigidprivacy.cloud/api/prm/my-tenant/requests/req_841203/report/file"
headers = {
"X-API-Key": "YOUR_API_KEY",
"Accept": "application/octet-stream"
}
print("Retrieving report for request req_841203...")
response = requests.get(url, headers=headers, stream=True)
if response.status_code == 200:
with open("user_results_bundle.zip", "wb") as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)
print("Report downloaded successfully and saved as user_results_bundle.zip")
elif response.status_code == 403:
print("Error: Request is not in a completed stage. Report is not ready.")
else:
print(f"Failed to download report. HTTP Status: {response.status_code}")

If you attempt to retrieve the report of a request that has not been approved or is still active, the server will block the download.

Response (403 Forbidden):

{
"message": "The privacy report for request req_841203 is not compiled yet.",
"status": 403
}

Response (404 Not Found):

If no files or reports were compiled for this request:

{
"message": "Report file not found for request req_841203",
"status": 404
}