Place or release a litigation hold on named records
Places or releases a litigation hold on named records.
POST /v1/label/hold
| Address | https://api.hanzo.ai/v1/label/hold |
| Method | POST |
| Operation | riskHoldLabels |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Places or releases a litigation hold on named records.
A hold is a fact about the RECORD, not about the world: it says retention may
not dispose of this row, and it asserts nothing about what happened. So it is
not a field on an assertion and it is not folded into the content digest —
carried there it was silently a no-op on any record that already existed, since
re-filing the same assertion with a hold flag produced the same digest, the
insert was ignored, and the caller was answered duplicate while the hold it
asked for was never placed. This op is the one way a hold moves, in either
direction, and the move is written to the audit log.
Every named id is this tenant's or is nothing. The statement runs against the tenant's own file, which holds no other tenant's rows and has no column that could name one.
Request
2 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
hold | body | boolean | — | Hold is the state to put them in: true places the hold, false releases it. |
ids | body | string[] | — | IDs are the content digests of the records, as returned by the write and by the read. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | riskHoldOut | ok |
200 body — 4 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
changed | body | integer | — | Changed is how many records moved into that state. |
held | body | integer | — | Held is how many records this tenant is now holding, at any age. |
hold | body | boolean | — | Hold echoes the state asked for. |
missing | body | integer | — | Missing is how many of the named ids this tenant does not hold. |
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.riskHoldLabels({ hold: false, ids: ["<ids>"] });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_hold_labels(hold=False, ids=["<ids>"])cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.LabelAPI.RiskHoldLabels(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_hold_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).riskHoldLabels();curl -X POST https://api.hanzo.ai/v1/label/hold \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"hold": false,
"ids": [
"<ids>"
]
}'Tool label, op riskHoldLabels — 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": "riskHoldLabels",
"input": {
"hold": false,
"ids": [
"<ids>"
]
}
}
}
}'How is this guide?