GET
/analytics/{datasetSlug}/upload/originalDownload Original Upload
Returns the original file of the dataset's stored upload as a download (text/csv, application/json or application/octet-stream), not a JSON envelope. 404 K9O_NOT_FOUND when none is stored.
Requires the datasets:read permission (PROJECT_ADMIN, PROJECT_AUTHOR or PROJECT_EDITOR by default).
Callers must be members of the project (an organization role alone does not grant access); project service tokens and extension tokens cannot call it.
Returns 503 K9O_ANALYTICS_UNAVAILABLE until the region's analytics storage is provisioned.
Parameters
| datasetSlug * | path | The Dataset's slug. |
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
Responses
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | The file as it was first uploaded to create or fill this dataset, unchanged. The content type follows the upload's format: `text/csv` for CSV, `application/json` for JSON, `application/octet-stream` when the format wasn't recorded. `Content-Disposition` is `attachment` with the original filename (quotes and backslashes replaced by `_`), or `original.<format>` when none was stored. | |
| 401 | K9O_UNAUTHENTICATED | The caller is not signed in. |
| 403 | K9O_ACCESS_DENIED | The caller is not a member of this project; an organization role alone does not grant access. |
| 403 | K9O_IAM_POLICY_DENIED | The caller's role or IAM policy does not grant datasets:read. |
| 404 | K9O_NOT_FOUND | The project was not found for this caller (project service tokens and extension tokens cannot call this endpoint). |
| 404 | K9O_DATASET_NOT_FOUND | No active dataset with this slug exists in the project. |
| 503 | K9O_ANALYTICS_UNAVAILABLE | The region's analytics storage is not available yet; retry later. |
Response body (200)
TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.analytics.downloadOriginal('<datasetSlug>')Showing example in TypeScript
Response example (200)
"[{\"order_id\":\"A-1001\",\"amount\":19.99}]"