OpenapiRisk
Read back one exhaustive search
Reads back one search run: every shape tried over this organisation's own history, best first, and the one that fit.
GET /v1/risk/search/{id}
| Address | https://api.hanzo.ai/v1/risk/search/{id} |
| Method | GET |
| Operation | riskSearchResult |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Reads back one search run: every shape tried over this organisation's own history, best first, and the one that fit.
A run another organisation started is simply not there — the same 404 an unknown id gives, so the read is not a probe oracle.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the run, taken from the path. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | riskSearchReport | ok |
200 body — 48 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
done | body | boolean | — | Done is false while the run is still going; the trials below are then the ones finished so far. |
ended | body | string | — | Ended is when it finished, RFC 3339. |
events | body | integer | — | Events is how much of this organisation's history was replayed. |
fitted | body | riskModelValue | — | |
fitted.address | body | string | — | Address names this value by its own content: the model's shape, the geometry seed, its position in the window, its threshold, its masses as IEEE-754 bits and… |
fitted.at | body | string | — | At is when it was published, RFC 3339, on the server clock. |
fitted.learned | body | integer | — | Learned is how many events are behind the masses. |
fitted.sequence | body | integer | — | Sequence is this value's place in YOUR organisation's own history, from 1 and contiguous until retention disposes of the oldest. |
fitted.shape | body | string | — | Shape NAMES the model space the masses are only meaningful against, as <family>:<digest> — the KIND of model, and that family's own digest over the feature… |
fitted.warmed | body | string | — | Warmed is how far your own event surface had been folded in when this value was published, RFC 3339. |
gap | body | string | — | Gap says why the winning shape could not be fitted into an adoptable value, when it could not. |
id | body | string | — | ID is the run. |
refusal | body | string | — | Refusal says why the run proves nothing, when it does. |
started | body | string | — | Started is when the run was accepted, RFC 3339. |
trials | body | riskTrial[] | — | Trials is every shape tried, best first. |
trials[].alerted | body | integer | — | Alerted is how many of those it would have raised. |
trials[].curve | body | number[] | — | Curve is the realised alert rate over successive tenths of the history — the learning curve, which says whether the shape settled or is still moving. |
trials[].fit | body | number | — | Fit ranks the shape, smaller being better: the relative miss of the stated appetite, plus flat penalties for never warming and for saturating, plus the share… |
trials[].learned | body | integer | — | Learned is how many events the shape learned from during the replay. |
trials[].realised | body | number | — | Realised is what that appetite actually produced. |
trials[].saturated | body | boolean | — | Saturated is whether the appetite could not be honoured by any threshold, which is a shape that alerts on nothing and reads like a quiet one. |
trials[].scored | body | integer | — | Scored is how many it was able to score. |
trials[].stated | body | number | — | Stated is the appetite the shape was tried at. |
trials[].topology | body | riskTopology | — | |
trials[].topology.blend | body | number | — | Blend is how much of a closing window folds into the reference: 1 replaces it outright, less makes the reference expensive to move. |
trials[].topology.depth | body | integer | — | Depth is how deep each tree is. |
trials[].topology.family | body | string | — | Family is the KIND of model this candidate is: halfspace is an ensemble of half-space trees whose masses are counters, and it is the family this search grid… |
trials[].topology.review | body | number | — | Review is the appetite this shape was tried at. |
trials[].topology.trees | body | integer | — | Trees is how many half-space trees the ensemble holds. |
trials[].topology.window | body | integer | — | Window is how many events make one reference window. |
trials[].warm | body | boolean | — | Warm is whether the shape learned enough to have an opinion at all over this organisation's whole history. |
winner | body | riskTrial | — | |
winner.alerted | body | integer | — | Alerted is how many of those it would have raised. |
winner.curve | body | number[] | — | Curve is the realised alert rate over successive tenths of the history — the learning curve, which says whether the shape settled or is still moving. |
winner.fit | body | number | — | Fit ranks the shape, smaller being better: the relative miss of the stated appetite, plus flat penalties for never warming and for saturating, plus the share… |
winner.learned | body | integer | — | Learned is how many events the shape learned from during the replay. |
winner.realised | body | number | — | Realised is what that appetite actually produced. |
winner.saturated | body | boolean | — | Saturated is whether the appetite could not be honoured by any threshold, which is a shape that alerts on nothing and reads like a quiet one. |
winner.scored | body | integer | — | Scored is how many it was able to score. |
winner.stated | body | number | — | Stated is the appetite the shape was tried at. |
winner.topology | body | riskTopology | — | |
winner.topology.blend | body | number | — | Blend is how much of a closing window folds into the reference: 1 replaces it outright, less makes the reference expensive to move. |
winner.topology.depth | body | integer | — | Depth is how deep each tree is. |
winner.topology.family | body | string | — | Family is the KIND of model this candidate is: halfspace is an ensemble of half-space trees whose masses are counters, and it is the family this search grid… |
winner.topology.review | body | number | — | Review is the appetite this shape was tried at. |
winner.topology.trees | body | integer | — | Trees is how many half-space trees the ensemble holds. |
winner.topology.window | body | integer | — | Window is how many events make one reference window. |
winner.warm | body | boolean | — | Warm is whether the shape learned enough to have an opinion at all over this organisation's whole history. |
Failure carries the platform error shape — see Errors.
Examples
hanzo risk search get <id>import { Configuration, RiskApi } from 'hanzoai';
const api = new RiskApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.riskSearchResult({ id: 'id' });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import RiskApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = RiskApi(client).risk_search_result(id='id')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.RiskAPI.RiskSearchResult(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, risk_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = risk_api::risk_search_result(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.RiskApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new RiskApi(client).riskSearchResult();curl https://api.hanzo.ai/v1/risk/search/<id> \
-H "Authorization: Bearer $HANZO_API_KEY"Tool risk, op riskSearchResult — 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": "risk",
"arguments": {
"op": "riskSearchResult",
"input": {
"id": "<id>"
}
}
}
}'How is this guide?