List userinfo

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.

GET /v1/deploy/session/userinfo

Addresshttps://api.hanzo.ai/v1/deploy/session/userinfo
MethodGET
Operationget_deploy_session_userinfo
AuthAuthorization: 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

StatusBodyMeaning
200deploy.sessionUserok
defaultproblem-detailsrefused

200 body — 6 fields.

FieldInTypeAlwaysDescription
groupsbodystring[]—Groups is the caller's group list, always empty here: this console authorizes on the platform SuperAdmin fact alone, not on argocd RBAC groups.
issbodystring—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.
loggedInbodyboolean—LoggedIn reports whether this browser holds a session this console accepts.
loginUrlbodystring—LoginURL is where an anonymous caller signs in.
logoutUrlbodystring—LogoutURL is where a signed-in caller ends the session.
usernamebodystring—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 principal carries none.

Failure carries the platform error shape — see Errors.

Examples

hanzo deploy session userinfo
import { 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 := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.DeployAPI.GetDeploySessionUserinfo(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::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.setBearerToken(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": {}
         }
       }
     }'

Deploy API · All Hanzo APIs · Interactive reference

Was this page useful?