DELETE
/analytics/{datasetSlug}Delete Dataset
Retires the dataset: it reads as absent from then on and its slug is never reissued.
Returns {slug, status: "retired"}.
Platform telemetry datasets cannot be deleted (403 K9O_FORBIDDEN).
Requires the datasets:delete permission (PROJECT_ADMIN or PROJECT_AUTHOR 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.
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 | Success | |
| 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:delete. |
| 403 | K9O_FORBIDDEN | Platform telemetry datasets are read-only. |
| 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. |
Response body (200)
| data * | object | The dataset that was retired. |
| slug * | string | The retired dataset's slug, as given in the path. |
| status * | "retired" | Always |
| meta * | any |
TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.analytics.delete('<datasetSlug>')Showing example in TypeScript
Response example (200)
{
"data": {
"slug": "string",
"status": "retired"
}
}