1. Docs
  2. API Reference
  3. Get the Environment's access model

Get the Environment's access model

GET/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/{envSlug}/access-model

Authentication

  • Bearer Token Authorization

    JWT access token

Path Parameters

Name Required Type Description
envSlugRequiredstring

Code samples

cURLJavaScriptPythonGo
curl -X GET "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/environments/value/access-model" \
  -H "Authorization: Bearer $CANOPY_TOKEN"

Responses

200 Access model returned (`flat` or `hierarchy`)
{
  "model": "flat"
}

application/json

  • modelenum: "flat" | "hierarchy"*
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

Returned object

On this page

Related endpoints

GETList Environments in an Application
POSTCreate a new Environment in an Application
GETGet a single Environment by slug
PATCHRename or re-slug an Environment
DELETEDelete an Environment
GETExport an Environment's configuration as JSON
POSTReplace an Environment's configuration from a JSON payload (destructive)
PUTSwitch the Environment's access model
GETGet hierarchy schema for the active Environment
PATCHUpdate hierarchy schema for the active Environment
POSTRevert this Environment from hierarchy to flat