Get hierarchy schema for the active Environment
/api/v1/hierarchy-schemaReturns the hierarchy schema for the active Environment, resolved from the principal context — the Application and Environment ride on the API key (env-pinned at issue time) or identity token, so the path carries no slugs. The schema defines the Environment's node_types, the allowed_children map governing parent/child rules, max_depth, and the root_node_type used when the root node is auto-created. Sibling Environments in the same Application can carry independent schemas; returns null when the Environment is in flat mode.
Authentication
Authorization Option A JWT access token. Never send alongside X-API-Key: a request carrying both is refused.
X-API-Key Option B API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.
Responses
application/json
data *HierarchySchemaResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X GET "https://auth.canopy-io.com/api/v1/hierarchy-schema" \ -H "X-API-Key: $CANOPY_API_KEY"
{ "data": { "node_types": [ "string" ], "allowed_children": {}, "max_depth": 0, "root_node_type": "string" } }
Tell us how we can improve this guide.