Create an API key
Creates a team API key for CI. The secret (xk_…) is returned once and
stored only as a hash, so the response is unrepeatable by design.
Authorization
BearerAuth A team API key, created by a team admin in the console and presented as
Authorization: Bearer xk_…. Xeonr Auth issues and verifies it; the
secret is shown once at creation and stored only as a hash, and a
revoked key stops working within 30 seconds. An existing fnt_… token
is accepted the same way.
In: header
Header Parameters
Define the version of the Connect protocol
1Define the timeout, in ms
Request Body
application/json
owner_team is the team's URN.
role must be TEAM_ROLE_EDITOR or TEAM_ROLE_VIEWER. Never owner or admin: a key that could mint more keys would make revocation meaningless.
"TEAM_ROLE_UNSPECIFIED" | "TEAM_ROLE_OWNER" | "TEAM_ROLE_EDITOR" | "TEAM_ROLE_VIEWER"description is what the key is for, up to 512 characters.
length <= 512expires_at_unix is when the key stops working; 0 is never. Xeonr Auth refuses one beyond the application's maximum lifetime, if it sets one.
int640 <= valueResponse Body
application/json
application/json
curl -X POST "https://functions.xeonr.io/xeonr.functions.v1.TeamService/CreateTeamToken" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{}'{
"token": {
"tokenId": "string",
"name": "string",
"role": "TEAM_ROLE_UNSPECIFIED",
"createdAtUnix": 0,
"lastUsedAtUnix": 0,
"keyPrefix": "string",
"legacyPrefix": "string",
"scopes": [
"string"
],
"createdBy": "string",
"description": "string",
"expiresAtUnix": 0,
"revokedAtUnix": 0
},
"secret": "string"
}{
"code": "not_found",
"message": "string",
"details": [
{
"type": "string",
"value": "string",
"debug": {}
}
]
}