Skip to main content
GET/analytics/{datasetSlug}/upload/original

Download 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
HTTPK9O CodeDescription
200The 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.
401K9O_UNAUTHENTICATEDThe caller is not signed in.
403K9O_ACCESS_DENIEDThe caller is not a member of this project; an organization role alone does not grant access.
403K9O_IAM_POLICY_DENIEDThe caller's role or IAM policy does not grant datasets:read.
404K9O_NOT_FOUNDThe project was not found for this caller (project service tokens and extension tokens cannot call this endpoint).
404K9O_DATASET_NOT_FOUNDNo active dataset with this slug exists in the project.
503K9O_ANALYTICS_UNAVAILABLEThe 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}]"

More in Analytics & Intelligence