export_document
Scope:documents:read (step-up) · Kind: read-only · Annotations: readOnlyHint: true, destructiveHint: false, openWorldHint: false
Render a document (markdown, pdf), page (html), or table (csv, json, markdown) to a file and get a short-lived download URL (~15 minutes; fetch it promptly). The file is a snapshot of the version it names — re-export after editing. Exporting never changes the artifact.
Parameters
string
required
The artifact id of a document, page or table.
'markdown' | 'html' | 'pdf' | 'csv' | 'json'
required
Which formats apply depends on the artifact kind:
Returns
string
A capability URL on the server’s
/files/ route. Valid for 15 minutes;
access is re-checked at download time.number
Milliseconds since epoch.
string
Derived from the title slug and format, for example
q3-launch-plan.pdf.string
number
number
The artifact version the file captures.
number
PDF only.
string[]
Renderer warning codes, if any.
Exported "<title>" as <filename> (<media type>, <bytes> bytes). Download within 15 minutes: <url>
Permissions and side effects
- Needs
documents:readand any role on the artifact. - Uses the same renderer and cache as the app’s Export menu, so a second export of an unchanged version is served from cache.
- Never changes the artifact. Recorded in the agent activity history.
- Exports are not delivered into the pod as attachments; the URL is the only output.
Errors
Example
RequestThe exact shape of the download URL is an implementation detail and may
differ from the example; treat it as opaque and fetch it as-is.