Report URL Result Style
about 1 month ago
report.generateandreport.synchronousnow accept an optionalresultStyleparameter. WithresultStyle: "url", a completed report'sreportDatacarries a short-lived presigned S3 downloadurlandmetadatainstead of the inlinedata/columnNames, letting clients download large reports directly from S3.- The presigned download is served with
Content-Encoding: br(Brotli) and no content negotiation, so clients fetchingreportData.urlmust decode Brotli. Browsers,node-fetch, and Pythonrequestswith thebrotli/brotlicffipackage decode it automatically; stock macOScurland a barepip install requestsdo not. - Once decoded, the downloaded body is JSON of the form
{ data, columnNames, metadata }— the same shape as inlinereportData, with column headers as the first row ofdata. Itsmetadatacarries onlyupdatedAtandtitle; the read-timereportGeneratedAt/cacheExpiresAttimestamps appear on the API response'sreportData.metadata, not in the downloaded file. - With
resultStyle: "url", a small set of completed reports whose cached result is stored in the legacy inline format fall back toinline—reportDatacarriesdata/columnNamesand nourl. Detect the fallback by checking forreportData.datawith noreportData.url.

