Hanzo AI
OpenapiFlags

Replace defs

Creates or replaces the flag definition at the path's key and returns the stored row.

PUT /v1/flags/defs/{key}

Addresshttps://api.hanzo.ai/v1/flags/defs/{key}
MethodPUT
Operationput_flags_defs_by_key
AuthAuthorization: Bearer $HANZO_API_KEY

Creates or replaces the flag definition at the path's key and returns the stored row. The BODY IS THE DEFINITION DOCUMENT — the flag-definition JSON object the evaluator consumes — and it is stored verbatim except that its "key" is forced to the key in the URL, so a document can never be filed under a name other than the one it was addressed by. Every write bumps the version and appends to the change log under the caller's identity.

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
keypathstringyesKey is the flag key to write, from the path.
(body)bodyanyyes

Response

StatusBodyMeaning
200DefRowok

200 body — 5 fields.

FieldInTypeAlwaysDescription
definitionbodyanyDefinition is the flag-definition document the evaluator consumes, kept BYTE-FOR-BYTE as it was written.
keybodystringKey is the flag's primary key in the caller's (org, project) store, and the name evaluation looks it up by.
updated_atbodystringUpdatedAt is when the definition was last written, RFC 3339 UTC.
updated_bybodystringUpdatedBy is the email of the principal who last wrote it.
versionbodyintegerVersion is 1 when the key was created and rises by one on every overwrite.

Failure carries the platform error shape — see Errors.

Examples

hanzo flags defs set <key>

Flags API · All Hanzo APIs · Interactive reference

How is this guide?

On this page