1. Docs
  2. API Reference
  3. Get the admin's resume-state for this Application

Get the admin's resume-state for this Application

GET/portal/v1/accounts/{accountSlug}/applications/{appSlug}/me/state

Returns 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

Bearer TokenAuthorization

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

Requires capability applications.viewDeveloper Console

View 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

  • dataUserAppStateResponseDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Errors

When the request can't be completed, the response body includes a stable error code you can branch on.

403account.capability_requiredForbidden
When it happens

The signed-in user's administrator roles do not grant the capability this endpoint requires.

Remediation

Ask an account administrator to grant a role carrying the capability named in the Authentication section, then retry.

Returned object

Request
curl -X GET "https://auth.canopy-io.com/portal/v1/accounts/{accountSlug}/applications/{appSlug}/me/state" \
  -H "Authorization: Bearer $CANOPY_TOKEN"
Response
{
  "data": {
    "environment_slug": "string"
  }
}
Related endpoints
GETGet the current Application
PATCHUpdate the Application name or settings
DELETEDelete an Application
PUTSet the App's default Environment
PUTUpdate the admin's resume-state for this Application
Was this page helpful?

Tell us how we can improve this guide.