Get the caller
Returns who the request is authenticated as. With an API key this is the key itself: its name, who made it, when it expires, its rate limit, and in capabilities the scopes it holds right now (cut down to what its maker holds). Call it first to check a key works.
api_keyAuthorizationBearer <token>A team API key, made by an admin under Settings, API keys. Send it as Authorization: Bearer chk_....
The caller.
application/json- response
Who is calling: a person signed in to the dashboard, or a team API key.
api_key?null|auth_provider*stringHow the caller signed in: email, google, github, or api_key.
"api_key"avatar_url?|The person's picture. Always null for an API key.
"https://avatars.githubusercontent.com/u/583231"capabilities?array<string>|The capability keys held. For an API key, its scopes as they stand on this request: never more than its maker holds now.
[ "view", "runs"]custom_role?null|email*stringThe person's email. For an API key, its maker's.
"dev@example.com"github_login?|The person's GitHub login. For an API key, its maker's.
"octocat"mfa_enabled*booleanWhether the person turned on two-factor sign-in.
falseplatform_admin*booleanWhether the caller administers the whole CoderHelm install (its operators, set in the install's configuration). Always false for an API key.
falserole*stringThe built-in role requests run as: viewer, member, admin or
owner. For a custom role or an API key, the highest built-in role
whose capabilities are all held; capabilities says exactly what is.
"viewer"status*stringThe team's account status: active or suspended.
"active"team_id*stringThe team every request acts on.
"TEAM#4817263"user_id*stringThe caller's id: USER#... for a person, APIKEY#<id> for an API key.
"APIKEY#01jb8x6f4m2c9qz3t7v5w1k0ha"curl -X GET 'https://api.coderhelm.com/api/me' \ -H "Authorization: Bearer $CODERHELM_API_KEY"{ "api_key": null, "auth_provider": "api_key", "avatar_url": "https://avatars.githubusercontent.com/u/583231", "capabilities": [ "view", "runs" ], "custom_role": null, "email": "dev@example.com", "github_login": "octocat", "mfa_enabled": false, "platform_admin": false, "role": "viewer", "status": "active", "team_id": "TEAM#4817263", "user_id": "APIKEY#01jb8x6f4m2c9qz3t7v5w1k0ha"}