1. Docs
  2. API Reference
  3. Get hierarchy schema for the active Environment

Get hierarchy schema for the active Environment

GET/api/v1/hierarchy-schema

Returns 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

Bearer TokenAuthorization Option A

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

API KeyX-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

  • dataHierarchySchemaResponseDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Returned object

Request
curl -X GET "https://auth.canopy-io.com/api/v1/hierarchy-schema" \
  -H "X-API-Key: $CANOPY_API_KEY"
Response
{
  "data": {
    "node_types": [
      "string"
    ],
    "allowed_children": {},
    "max_depth": 0,
    "root_node_type": "string"
  }
}
Related endpoints
PATCHUpdate hierarchy schema for the active Environment
Was this page helpful?

Tell us how we can improve this guide.