Get hierarchy schema for the active Environment
/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/hierarchy-schemaAuthentication
- Bearer Token
AuthorizationJWT access token
Path Parameters
| Name | Required | Type | Description |
|---|---|---|---|
envSlug | string |
Code samples
curl -X GET "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/value/hierarchy-schema" \
-H "Authorization: Bearer $CANOPY_TOKEN"const response = await fetch("https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/value/hierarchy-schema", {
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/value/hierarchy-schema",
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/value/hierarchy-schema", nil)
req.Header.Set("Authorization", "Bearer $CANOPY_TOKEN")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200 Hierarchy schema returned
{
"node_types": [
"string"
],
"allowed_children": {},
"max_depth": 0,
"root_node_type": "string"
}application/json
node_types *string[]allowed_children *any objectmax_depth *numberroot_node_typestring
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)
404 Environment not found in this Application