Dispose of this tenant's expired assertions, whole records only
Applies this tenant's retention, and only this tenant's. It is bounded three ways, each a compliance property rather than a convenience.
POST /v1/label/dispose
| Address | https://api.hanzo.ai/v1/label/dispose |
| Method | POST |
| Operation | riskDisposeLabels |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Applies this tenant's retention, and only this tenant's.
It is bounded three ways, each a compliance property rather than a convenience. It refuses a boundary younger than the platform floor, because a label can be the input to an adverse action and five years is what the retention ledger holds such a record for. It never touches a record under litigation hold. And it disposes of whole records rather than redacting fields.
It removes the derived columnar copy BEFORE the record, and refuses the whole disposal if the warehouse cannot be reached. The other order would leave rows in the warehouse that nothing can identify any more, which is a disposal that did not happen and says it did.
Request
1 field, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
before | body | string | — | Before disposes of assertions WRITTEN before this instant, RFC 3339. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | riskDisposeOut | ok |
200 body — 7 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
before | body | string | — | Before echoes the retention boundary that was applied, RFC 3339 in UTC, as this plane parsed it from the request. |
disposed | body | integer | — | Disposed is how many whole records were removed. |
held | body | integer | — | Held is how many records inside the boundary were kept under litigation hold. |
oldest | body | string | — | Oldest is the WRITE time of the oldest assertion this tenant still holds after the sweep, RFC 3339, and it is omitted exactly when nothing remains at all. |
remaining | body | integer | — | Remaining is how many disposable records are still older than the boundary. |
restored | body | integer | — | Restored is how many records this sweep had already removed from the derived columnar copy and then did NOT dispose of, because a litigation hold arrived… |
total | body | integer | — | Total and Oldest describe what the tenant still holds afterwards, so a disposal that removed nothing is distinguishable from a tenant that had nothing. |
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, LabelApi } from 'hanzoai';
const api = new LabelApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.riskDisposeLabels({ before: "<before>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import LabelApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = LabelApi(client).risk_dispose_labels(before="<before>")cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.LabelAPI.RiskDisposeLabels(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, label_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = label_api::risk_dispose_labels(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.LabelApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new LabelApi(client).riskDisposeLabels();curl -X POST https://api.hanzo.ai/v1/label/dispose \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"before": "<before>"
}'Tool label, op riskDisposeLabels — 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": "label",
"arguments": {
"op": "riskDisposeLabels",
"input": {
"before": "<before>"
}
}
}
}'How is this guide?