AdlyseAdlyseMCP Docs
⌘K
Overview
adlyse-insights
list_ad_accountsget_dashboard_snapshotget_impact_analysislist_guidelinesget_guideline
adlyse-reports
list_report_templateslist_reportsget_reportgenerate_reportlist_report_targets
adlyse-ads
list_campaignsget_performancelist_adsget_ad_performancelist_change_eventsupdate_campaign_statusupdate_campaign_budget
adlyse-workflows
list_workflowsget_workflowrun_workflowget_run_status
  1. Overview/
  2. adlyse-reports

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#

NameTypeRequiredDefaultDescription
report_idstringyesReport 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"
}
FieldDescription
report.pdf_urlPresigned download link; present only when status="ready" and file_key is set
report.pdf_url_expires_in_secondsApproximate 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_typeWhen
auth_errorMissing / invalid API key
not_foundReport 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 seconds

Typical 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 report
  • list_reports — discover recent reports
←Previous
list_reports
Next→
generate_report