get_report
Return full metadata for one report. When status="ready" the response includes a presigned pdf_url that expires in approximately one hour.
Use this to poll after generate_report; the report is finished when status is ready (success) or failed (with error_message).
Parameters#
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
report_id | string | yes | Report id (format ad_rpt_…) |
Returns#
json
{
"report": {
"id": "ad_rpt_abc",
"title": "Weekly Check-In (Apr 15 – Apr 21)",
"template": { "id": "ad_rtpl_xyz", "key": "weekly_check_in", "version": 1, "name": "Weekly Check-In" },
"period_start": "2026-04-15",
"period_end": "2026-04-21",
"status": "ready",
"review_status": null,
"volatility_score": 42,
"volatility_band": "normal",
"data_coverage_pct": 98,
"delivery_channels": ["in_app"],
"created_via": "ai",
"created_at": "2026-04-22T09:30:00Z",
"generated_at": "2026-04-22T09:30:42Z",
"page_count": 4,
"file_size": 67948,
"error_code": null,
"error_message": null,
"pdf_url": "https://supabase.example/.../report.pdf?signature=...",
"pdf_url_expires_in_seconds": 3600
},
"accounts": [
{
"ad_account_id": "ad_acct_abc",
"account_name": "Acme Corp - Google",
"platform": "google_ads",
"external_account_id": "1234567890",
"currency": "USD",
"timezone": "America/New_York"
}
],
"source": "adlyse.reports@v1"
}| Field | Description |
|---|---|
report.pdf_url | Presigned download link; present only when status="ready" and file_key is set |
report.pdf_url_expires_in_seconds | Approximate TTL of the presigned URL (1 hour) |
accounts[] | Snapshot of ad-account identity at report creation time; survives later renames |
The report payload has the same shape as entries in list_reports, plus pdf_url / pdf_url_expires_in_seconds when ready.
Errors#
error_type | When |
|---|---|
auth_error | Missing / invalid API key |
not_found | Report doesn’t exist or belongs to another organization |
Polling pattern#
plaintext
loop:
result = get_report(report_id)
if result.report.status == "ready": break
if result.report.status == "failed": raise result.report.error_message
sleep 2 secondsTypical completion: 10–30 seconds. Long-running reports (many accounts, large periods) can take up to ~2 minutes.
Example#
Request:
json
{ "report_id": "ad_rpt_abc" }Response (ready state): as shown above.
Response (pending):
json
{
"report": {
"id": "ad_rpt_abc",
"status": "rendering",
"error_code": null,
"error_message": null
},
"accounts": [],
"source": "adlyse.reports@v1"
}See also#
generate_report— kick off a new reportlist_reports— discover recent reports