Get the admin's resume-state for this Application
/portal/v1/accounts/{accountSlug}/applications/{appSlug}/me/stateAuthentication
- Bearer Token
AuthorizationJWT access token
Code samples
curl -X GET "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/me/state" \
-H "Authorization: Bearer $CANOPY_TOKEN"const response = await fetch("https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/me/state", {
method: "GET",
headers: {
"Authorization": "Bearer $CANOPY_TOKEN"
},
});
const data = await response.json();import requests
response = requests.get(
"https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/me/state",
headers={
"Authorization": "Bearer $CANOPY_TOKEN"
},
)
data = response.json()package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.canopy.dev/portal/v1/accounts/{accountSlug}/applications/{appSlug}/me/state", nil)
req.Header.Set("Authorization", "Bearer $CANOPY_TOKEN")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
200 Returns the env slug the admin should land on for this App — their last-active env if recorded, else the App's default. Null when the App has no envs.
{
"environment_slug": "string"
}application/json
environment_slug *stringSlug of the env the admin should land on for this App. Resolved server-side from the admin's last-active env, falling back to the App's default. Null only when the App has no envs.
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)