Download Interactive HTML Export
โถStep 6: Download the interactive HTML export
The real product export โ a single self-contained HTML file rendered server-side by the same job that produces the audit-trail PDF, carrying the same ten sections plus a live verdict-coloured plot map. This is what to hand a customer, a regulator or your own front end; the previous step is only a quick Bruno-side preview built from the JSON report.
โถPrerequisite
This workflow uploaded with create_audit_trail: true, so the render was
already queued when the record was created. No generate call is needed here โ
the step below polls until the HTML lands.
โถWhat this step does
GET /regulations/eudr/audit-trail/{{fp_fac_record_id}}/audit-trail/html returns a
JSON envelope carrying short-lived signed URLs, not the bytes. An HTML
export is always exactly one file:
| Field | Meaning |
|---|---|
files[0].download_url | Signed GCS URL โ GET it to download the file. No API key needed |
expires_at | When the link(s) stop working |
files[0].size_bytes | Size of the export (a few MB for a small record; tens of MB for thousands of plots) |
stale / rebuilding | Whether the stored file still reflects the current audit trail |
The after-response script follows the link and renders the result in the
Visualize tab, so you see the actual export rather than a reconstruction.
โถTiming: this step polls
The HTML is written last, after the PDF and the package, as an additive step
that can never fail the render job. So there is a window where the generate
task already reports completed and the HTML does not exist yet. The
endpoint reports that as 425 Too Early, and this step retries on it
(20 attempts, 3s apart) before asserting.
A 404 is different: it means no export exists for this version at all, so
generate one first. A 425 that never clears means the HTML render itself
failed โ it cannot fail the task, so the PDF and package are still valid;
re-run the render with ?force=true to retry it.
โถHosting it
The signed link pins Content-Disposition: attachment, so it always downloads
and never renders in place. For a durable, shareable page: fetch the bytes
once, store them, and serve them from a URL you control. ?ttl= accepts up to
604800 (7 days) if you need a wide window for the transfer.
See Download Audit Trail HTML for the full contract.
Required scope:
eudr:read