Hanzo
OpenapiExperiment

Is one experiment's definition and lifecycle: variants, weights, control arm,…

Is one experiment's definition and lifecycle: variants, weights, control arm, status and winner.

GET /v1/experiment/{id}

Addresshttps://api.hanzo.ai/v1/experiment/{id}
MethodGET
Operationget_experiment_by_id
AuthAuthorization: Bearer $HANZO_API_KEY

Is one experiment's definition and lifecycle: variants, weights, control arm, status and winner.

It reads the registry row only — the definition and the decision, never live measurements. Assignment lives in the flags plane and outcomes in analytics; this is the value that names both.

Scoped to the caller's org and project from the validated principal, so another tenant's experiment of the same id is simply not found. An id that is not a legal slug is answered the same way, without a store read — the shape check and the existence check are one answer, so neither leaks the other.

Request

1 field.

FieldInTypeRequiredDescription
idpathstringyesID is the experiment the URL names.

Response

StatusBodyMeaning
200Trialok

200 body — 18 fields.

FieldInTypeAlwaysDescription
createdAtbodystringwhen it started assigning
createdBybodystringthe credential that registered it
decidedAtbodystringwhen the promotion took effect
decidedBybodystringthe credential that promoted the winner
exposureEventbodystringthe event that enrols a subject — the analysis denominator
flagKeybodystringthe assignment flag this experiment drives
idbodystringthe experiment's slug, unique within the project
metricEventbodystringthe event that counts as a conversion — the numerator
namebodystringfree text for a reader
projectbodystringthe sub-scope within the org, stamped from the principal
statusbodystringrunning while it assigns and measures, decided once a winner is promoted
subjectKindbodystringthe unit assigned and measured: user, org, session or audience
variantsbodyArm[]the arms, weighted, one of them the control
variants[].controlbodybooleantrue on the baseline arm every other arm is compared to
variants[].keybodystringthe arm's slug, unique within the experiment
variants[].payloadbodyanyopaque JSON the arm carries, which the consumer interprets
variants[].weightbodynumberits share of the rollout; the arms sum to 100
winnerbodystringthe arm promoted to the whole rollout

Failure carries the platform error shape — see Errors.

Examples

hanzo experiments get <id>

Experiment API · All Hanzo APIs · Interactive reference

How is this guide?

On this page