Dispose of one dataset and every version of it
Disposes of one dataset and every version of it: the rows are dropped and the register is marked with what went. This is the ONLY expiry in this plane.
DELETE /v1/dataset/{name}
| Address | https://api.hanzo.ai/v1/dataset/{name} |
| Method | DELETE |
| Operation | riskDeleteDataset |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Disposes of one dataset and every version of it: the rows are dropped and the register is marked with what went.
This is the ONLY expiry in this plane. Neither table carries a TTL, deliberately: a table TTL is a fleet-wide clock no tenant can hold longer or shorten, which is the opposite of a retention decision belonging to the tenant whose records they are. The drop is a partition drop on (org, dataset), so the tenant is the first component of the thing being dropped and a disposal cannot be spelled across one.
The BYTES are what goes. The register keeps one disposed row per version — the
name, the number, the spec, the digest and who disposed of it when — for two
reasons: a retention obligation is answered by a record of the deletion, not by
silence; and version numbers must stay monotone, so that after orders is
disposed of and declared again the next version is 4 and not 1. A number that
could be reused would make every citation of orders v3 ambiguous forever.
It is not reversible and there is no soft state in between. A version a model cited has no rows once this returns, and every read of it says so.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
name | path | string | yes | Name is the dataset, from the path. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | riskDatasetDisposal | ok |
200 body — 3 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
dataset | body | string | — | Dataset is the dataset that was disposed of. |
rows | body | integer | — | Rows is how many rows they held between them, as the REGISTER recorded them when each was materialised — not a count of what the drop deleted, which is gone by… |
versions | body | integer | — | Versions is how many versions went. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, DatasetApi } from 'hanzoai';
const api = new DatasetApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.riskDeleteDataset({ name: 'name' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import DatasetApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DatasetApi(client).risk_delete_dataset(name='name')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.DatasetAPI.RiskDeleteDataset(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, dataset_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = dataset_api::risk_delete_dataset(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DatasetApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new DatasetApi(client).riskDeleteDataset();curl -X DELETE https://api.hanzo.ai/v1/dataset/<name> \
-H "Authorization: Bearer $HANZO_API_KEY"Tool dataset, op riskDeleteDataset — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "dataset",
"arguments": {
"op": "riskDeleteDataset",
"input": {
"name": "<name>"
}
}
}
}'How is this guide?