Returns details about the authentication material used in this request.
Response body
- {object}Response object.
data
{object} requiredResult data.tokenKind
string requiredThe type of authentication material used for the request.one ofapi, sessionid
string requiredThe API token ID (slug) or session token UUID.name
stringThe API token name or session token label, if set.description
stringThe description of the API token, if API token authentication was used.entityId
string requiredThe ID (slug) of the entity this authentication material is scoped to.entityUid
string requiredThe object ID of the entity this authentication material is scoped to.entityType
string requiredThe type of entity this authentication material is scoped to.one ofteam, orgorgId
stringThe ID (slug) of the organisation, if the entity is an org-owned team.orgUid
stringThe object ID of the organisation, if the entity is an org-owned team.role
{object}The role assigned to the API token, if API token authentication was used.name
stringThe display name of the role.roleId
stringThe ID (slug) of the role.roleType
stringThe type of the role.one ofteam, orgentityType
string requiredThe entity type of the role.one ofteam, orgpermissions
{object}The effective permissions granted to this authentication material.orgScope
[array]Organisation-level permission strings.- string
teamScope
[array]Team-level permission strings.- string
projectScope
[array]Project-level permission strings.- string
creatorEmail
stringThe email of the user who created the API token.createdAt
string requiredThe time the authentication material was created.expiresAt
string | nullThe time the authentication material expires, or null if it has no expiry.
API
CLI
JS Client
GET /v1/auth
Example response
200 OK
Details about the current authentication.
JSON
{
"data": {
"tokenKind": "api",
"id": "my-api-token",
"name": "My API Token",
"description": "CI/CD pipeline token",
"entityId": "my-team",
"entityUid": "507f1f77bcf86cd799439011",
"entityType": "team",
"orgId": "my-org",
"orgUid": "507f191e810c19729de860ea",
"role": {
"name": "Developer",
"roleId": "developer",
"roleType": "team",
"entityType": "team"
},
"creatorEmail": "user@example.com",
"createdAt": "2024-01-15T10:30:00.000Z",
"expiresAt": "2024-07-15T10:30:00.000Z"
}
}