Answers "is this browser signed in, and if not where does it sign in?" — the…
Answers "is this browser signed in, and if not where does it sign in?" — the dashboard SPA's bootstrap question, and the only route on this plane that…
GET /v1/deploy/session/userinfo
| Address | https://api.hanzo.ai/v1/deploy/session/userinfo |
| Method | GET |
| Operation | get_deploy_session_userinfo |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Answers "is this browser signed in, and if not where does it sign in?" — the dashboard SPA's bootstrap question, and the only route on this plane that answers for an anonymous caller.
The anonymous answer carries loggedIn:false and a URL and NOTHING else: no username, no org, no groups, no issuer, no hint about who the caller might be or what exists in the cluster. Answering it costs nothing (the caller already knows whether it holds a cookie) and withholding it costs the whole sign-in journey.
The predicate is the platform SuperAdmin fact — the SAME one every other route here gates on, minted from a validated principal whose org is the reserved admin org — so a validated-but-not-SuperAdmin caller is reported as NOT signed in, which is the truth as this console defines it: they cannot use it.
Request
GET /v1/deploy/session/userinfo takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | sessionUser | ok |
200 body — 6 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
groups | body | string[] | — | Groups is the caller's group list, always empty here: this console authorizes on the platform SuperAdmin fact alone, not on argocd RBAC groups. |
iss | body | string | — | Iss is the token issuer as the SPA expects to see it — the literal "argocd", so the UI never triggers an SSO redirect of its own. |
loggedIn | body | boolean | — | LoggedIn reports whether this browser holds a session this console accepts. |
loginUrl | body | string | — | LoginURL is where an anonymous caller signs in. |
logoutUrl | body | string | — | LogoutURL is where a signed-in caller ends the session. |
username | body | string | — | Username is the validated principal's user ID — the opaque gateway id, which is what argocd's UI renders as the signed-in user here — or "admin" when the… |
Failure carries the platform error shape — see Errors.
Examples
hanzo deploy session userinfoimport { Configuration, DeployApi } from 'hanzoai';
const api = new DeployApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getDeploySessionUserinfo();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import DeployApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = DeployApi(client).get_deploy_session_userinfo()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.DeployAPI.GetDeploySessionUserinfo(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, deploy_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = deploy_api::get_deploy_session_userinfo(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.DeployApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new DeployApi(client).getDeploySessionUserinfo();curl https://api.hanzo.ai/v1/deploy/session/userinfo \
-H "Authorization: Bearer $HANZO_API_KEY"Tool deploy, op get_deploy_session_userinfo — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "deploy",
"arguments": {
"op": "get_deploy_session_userinfo",
"input": {}
}
}
}'How is this guide?