List hierarchy (scoped tree)
/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/nodesAuthentication
- Bearer Token
AuthorizationJWT access token
Code samples
curl -X GET "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/nodes" \
-H "Authorization: Bearer $CANOPY_TOKEN"const response = await fetch("https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/nodes", {
method: "GET",
headers: {
"Authorization": "Bearer $CANOPY_TOKEN"
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/nodes",
headers={
"Authorization": "Bearer $CANOPY_TOKEN"
},
)
data = response.json()package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/nodes", nil)
req.Header.Set("Authorization", "Bearer $CANOPY_TOKEN")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200 Scoped hierarchy tree returned
{
"tree": [
{
"id": "string",
"name": "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",
"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",
"slug": "string",
"node_type": "string",
"parent_node_id": "string",
"status": "string",
"access_state": "accessible",
"can_access": false,
"can_manage": false,
"children": [
{
"id": null,
"name": null,
"slug": null,
"node_type": null,
"parent_node_id": null,
"status": null,
"access_state": null,
"can_access": null,
"can_manage": null,
"children": null,
"version": null
}
],
"version": 0
}
],
"version": 0
}
],
"version": 0
}
],
"scope": {
"accessible_node_ids": [
"string"
],
"scope_root_node_ids": [
"string"
],
"entry_node_ids": [
"string"
]
}
}application/json
tree *HierarchyTreeNodeDto[]scope *HierarchyScopeDto
401 Invalid or expired token
403 This token is not authorized for this endpoint (wrong principal type — e.g., admin token on identity-only endpoint, or vice versa)