Get 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}

Addresshttps://api.hanzo.ai/v1/risk/search/{id}
MethodGET
OperationriskSearchResult
AuthAuthorization: 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.

FieldInTypeRequiredDescription
idpathstringyesID is the run, taken from the path.

Response

StatusBodyMeaning
200risk.riskSearchReportok
defaultproblem-detailsrefused

200 body — 48 fields.

FieldInTypeAlwaysDescription
donebodyboolean—Done is false while the run is still going; the trials below are then the ones finished so far.
endedbodystring—Ended is when it finished, RFC 3339.
eventsbodyinteger (int64)—Events is how much of this organisation's history was replayed.
fittedbodyrisk.riskModelValue—
fitted.addressbodystring—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 the fold watermark behind them.
fitted.atbodystring—At is when it was published, RFC 3339, on the server clock.
fitted.learnedbodyinteger (int64)—Learned is how many events are behind the masses.
fitted.sequencebodyinteger (int64)—Sequence is this value's place in YOUR organisation's own history, from 1 and contiguous until retention disposes of the oldest.
fitted.shapebodystring—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 inventory in order and the detector's geometry parameters.
fitted.warmedbodystring—Warmed is how far your own event surface had been folded in when this value was published, RFC 3339.
gapbodystring—Gap says why the winning shape could not be fitted into an adoptable value, when it could not.
idbodystring—ID is the run.
refusalbodystring—Refusal says why the run proves nothing, when it does.
startedbodystring—Started is when the run was accepted, RFC 3339.
trialsbodyrisk.riskTrial[]—Trials is every shape tried, best first.
trials[].alertedbodyinteger (int64)—Alerted is how many of those it would have raised.
trials[].curvebodynumber (double)[]—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[].fitbodynumber (double)—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 of coordinates that were blind.
trials[].learnedbodyinteger (int64)—Learned is how many events the shape learned from during the replay.
trials[].realisedbodynumber (double)—Realised is what that appetite actually produced.
trials[].saturatedbodyboolean—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[].scoredbodyinteger (int64)—Scored is how many it was able to score.
trials[].statedbodynumber (double)—Stated is the appetite the shape was tried at.
trials[].topologybodyrisk.riskTopology—
trials[].topology.blendbodynumber (double)—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.depthbodyinteger (int64)—Depth is how deep each tree is.
trials[].topology.familybodystring—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 ranks.
trials[].topology.reviewbodynumber (double)—Review is the appetite this shape was tried at.
trials[].topology.treesbodyinteger (int64)—Trees is how many half-space trees the ensemble holds.
trials[].topology.windowbodyinteger (int64)—Window is how many events make one reference window.
trials[].warmbodyboolean—Warm is whether the shape learned enough to have an opinion at all over this organisation's whole history.
winnerbodyrisk.riskTrial—
winner.alertedbodyinteger (int64)—Alerted is how many of those it would have raised.
winner.curvebodynumber (double)[]—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.fitbodynumber (double)—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 of coordinates that were blind.
winner.learnedbodyinteger (int64)—Learned is how many events the shape learned from during the replay.
winner.realisedbodynumber (double)—Realised is what that appetite actually produced.
winner.saturatedbodyboolean—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.scoredbodyinteger (int64)—Scored is how many it was able to score.
winner.statedbodynumber (double)—Stated is the appetite the shape was tried at.
winner.topologybodyrisk.riskTopology—
winner.topology.blendbodynumber (double)—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.depthbodyinteger (int64)—Depth is how deep each tree is.
winner.topology.familybodystring—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 ranks.
winner.topology.reviewbodynumber (double)—Review is the appetite this shape was tried at.
winner.topology.treesbodyinteger (int64)—Trees is how many half-space trees the ensemble holds.
winner.topology.windowbodyinteger (int64)—Window is how many events make one reference window.
winner.warmbodyboolean—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 := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.RiskAPI.RiskSearchResult(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::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.setBearerToken(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>"
           }
         }
       }
     }'

Risk API · All Hanzo APIs · Interactive reference

Was this page useful?