Get the admin's resume-state for this Application
/portal/v1/accounts/{accountSlug}/applications/{appSlug}/me/stateReturns the calling admin's resume state for the active Application as { environment_slug }. The slug is resolved from the admin's last-visited Environment when it still exists in this Application, falling back to the Application's default_environment_id, and is null when neither resolves. Drives where the dashboard lands the admin on sign-in.
Authentication
AuthorizationJWT access token. Never send alongside X-API-Key: a request carrying both is refused.
applications.viewDeveloper ConsoleView the Account's Applications and Environments. Granted through an administrator role in the Admin Workspace; a valid token without it is refused with 403.
Responses
application/json
data *UserAppStateResponseDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Errors
When the request can't be completed, the response body includes a stable error code you can branch on.
account.capability_requiredForbiddenThe signed-in user's administrator roles do not grant the capability this endpoint requires.
Ask an account administrator to grant a role carrying the capability named in the Authentication section, then retry.
Returned object
curl -X GET "https://auth.canopy-io.com/portal/v1/accounts/{accountSlug}/applications/{appSlug}/me/state" \ -H "Authorization: Bearer $CANOPY_TOKEN"
{ "data": { "environment_slug": "string" } }
Tell us how we can improve this guide.