Publish datafile
publish_datafilePublish a datafile to a CDN path you choose, so a page can fetch() it client-side. Only needed for that client-side fetch — NOT to bind a datafile server-side (an endpoint's @latest datafile ref reads the stored draft directly). Pass expected_content_sha256 (from the create/update/get that produced this content) — publish fails if the content changed since, so you publish the exact version you intend. Returns the public CDN URL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datafile_id | Yes | the datafile id to publish | |
| public_path | Yes | the CDN path to publish at (e.g. data/products.json) | |
| expected_content_sha256 | Yes | the content_sha256 returned by the create/update/get of this datafile; publish fails if the stored content has changed since, so publish the exact version you intend |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | ||
| public_url | Yes | ||
| datafile_id | Yes |