Hanzo
OpenapiO11y

Creates a custom role in the caller's org from a name, an optional description…

Creates a custom role in the caller's org from a name, an optional description and the transaction groups it grants, answering the new role's id.

POST /v1/o11y/roles

Addresshttps://api.hanzo.ai/v1/o11y/roles
MethodPOST
OperationCreateRole
AuthAuthorization: Bearer $HANZO_API_KEY

Creates a custom role in the caller's org from a name, an optional description and the transaction groups it grants, answering the new role's id.

Names are lowercase letters and hyphens only, and may not start with the reserved managed-role prefix; the runtime refuses anything else.

Request

9 fields, body application/json (required).

FieldInTypeRequiredDescription
descriptionbodystringDescription says what the role is for.
namebodystringName is the role's name: lowercase letters and hyphens, at most 50 characters, not starting with the reserved managed-role prefix.
transactionGroupsbodyo11y.O11yTransactionGroup[]TransactionGroups are the grants the role carries.
transactionGroups[].objectGroupbodyo11y.O11yObjectGroup
transactionGroups[].objectGroup.resourcebodyo11y.O11yResourceRef
transactionGroups[].objectGroup.resource.kindbodystringKind is the resource kind the type belongs to.
transactionGroups[].objectGroup.resource.typebodystringType is the resource type, e.g.
transactionGroups[].objectGroup.selectorsbodystring[]Selectors pick the instances; a wildcard selects them all.
transactionGroups[].relationbodystringRelation is the verb the grant allows.

Response

StatusBodyMeaning
201o11y.O11yRoleCreateOutcreated

201 body — 3 fields.

FieldInTypeAlwaysDescription
databodyo11y.O11yCreated
data.idbodystringID is the new record's id.
statusbodystringStatus is "success".

Failure carries the platform error shape — see Errors.

Examples

hanzo o11y roles create

O11y API · All Hanzo APIs · Interactive reference

How is this guide?

On this page