Read the schema an organization's tree follows
/api/v1/organizations/{id}/schemaThe Environment's hierarchy schema as a tenant's admin screen needs it: node_types, allowed_children (which types go beneath which) and max_depth, counted from the organization. An Environment without a hierarchy answers 404 hierarchy.schema_not_configured. Readable by whoever administers anything inside the organization (the same callers as GET /organizations/{id}/me); refused with 403 for a caller holding nothing there.
Authentication
Bearer Token
Authorization Option A JWT access token. Never send alongside X-API-Key: a request carrying both is refused.
API Key
X-API-Key Option B API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.
Path Parameters
idstring Required Responses
application/json
data *HierarchySchemaResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Returned object
curl -X GET "https://auth.canopy-io.com/api/v1/organizations/value/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.