What the caller administers in an organization
/api/v1/organizations/{id}/meThe authority read a customer's admin screen renders from: whether the caller holds canopy:organization.manage at the organization node (administers_organization), the topmost nodes where they hold canopy:access.manage inside it (access_roots, each with its name, type and the path of names from the organization down to it; the organization node itself when they administer the organization), the same for the structure and roles keys (empty until those ship), and whether the Environment's schema allows nodes beneath an organization (has_hierarchy). Computed from assignments at or beneath the organization node only, so a role held above every organization does not count. The developer's key answers as administering the whole organization. Refused with 403 for a caller holding nothing inside the organization.
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.
Path Parameters
idstring Required Responses
application/json
data *OrganizationMeResponseDto
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/me" \ -H "X-API-Key: $CANOPY_API_KEY"
{ "data": { "administers_organization": false, "access_roots": [ { "node_id": "string", "name": "string", "node_type": "string", "path": [ "string" ] } ], "structure_roots": [ { "node_id": "string", "name": "string", "node_type": "string", "path": [ "string" ] } ], "roles_roots": [ { "node_id": "string", "name": "string", "node_type": "string", "path": [ "string" ] } ], "has_hierarchy": false } }
Tell us how we can improve this guide.