List hierarchy (scoped tree)
/api/v1/nodesReturns the caller's accessible hierarchy as a nested tree for the current Environment, each node annotated with access_state, can_access, and can_manage. user principals (dashboard) see the full tree; API-key principals see only the subtree their access_mode/scopes grant — full_access unlocks everything, while scoped keys see nodes reachable via hierarchy.view. The response also includes a scope block listing accessible_node_ids, scope_root_node_ids, and entry_node_ids.
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.
Headers
If-None-MatchAn `ETag` from a previous response. Answers `304 Not Modified` when the hierarchy has not changed since, so a client holding a cached tree can revalidate on a short interval without re-reading it.
Responses
application/json
data *ScopedHierarchyTreeResponseDto
The hierarchy is unchanged since the supplied `ETag`. No body; keep using the cached tree.
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X GET "https://auth.canopy-io.com/api/v1/nodes" \ -H "If-None-Match: value" \ -H "X-API-Key: $CANOPY_API_KEY"
{ "data": { "tree": [ { "id": "string", "name": "string", "description": "string", "slug": "string", "node_type": "string", "parent_node_id": "string", "status": "string", "access_state": "accessible", "can_access": false, "can_manage": false, "children": [ { "id": "string", "name": "string", "description": "string", "slug": "string", "node_type": "string", "parent_node_id": "string", "status": "string", "access_state": "accessible", "can_access": false, "can_manage": false, "children": [ { "id": "string", "name": "string", "description": "string", "slug": "string", "node_type": "string", "parent_node_id": "string", "status": "string", "access_state": "accessible", "can_access": false, "can_manage": false, "children": [ null ], "version": 0, "direct_count": 0, "inherited_count": 0 } ], "version": 0, "direct_count": 0, "inherited_count": 0 } ], "version": 0, "direct_count": 0, "inherited_count": 0 } ], "scope": { "accessible_node_ids": [ "string" ], "scope_root_node_ids": [ "string" ], "entry_node_ids": [ "string" ] } } }
Tell us how we can improve this guide.