Endpoints
Users
How to retrieve user information using the public API
The users endpoint allows administrators to retrieve information about all users in the system.
List Users
GET/api/public/v0/users
Returns a list of all users in the system. This endpoint is restricted to administrators only.
Authentication
Requires an API key with Admin role permissions. See Authentication for more details.
Response Format
{
users: Array<{
email: string // Email address of the user
name: string // Name of the user
role: string // Workspace role (`owner` | `admin` | `user` | `test-runner` | `viewer`)
authorizationTypes: string[] // Sign-in methods: `password` | `google` | `saml`
totpEnabled: boolean // Whether TOTP two-factor authentication is on
passkeyCount: number // Number of passkeys the user registered
createdAt: datetime // Creation time
lastActivity: datetime | null // Time of the user's latest activity, null if never active
}>
}User Roles
| Role | Permissions |
|---|---|
| Owner | Full system access with tenant management |
| Admin | Full project access with user management |
| User | Can create and manage test cases and runs |
| Test Runner | Can execute test runs only |
| Viewer | Read-only access to projects |
Example Request
curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/usersExample Response
{
"users": [
{
"email": "admin@example.com",
"name": "System Admin",
"role": "admin",
"authorizationTypes": ["password"],
"totpEnabled": true,
"passkeyCount": 1,
"createdAt": "2024-01-01T00:00:00Z",
"lastActivity": "2024-11-14T09:30:00Z"
},
{
"email": "tester@example.com",
"name": "Test Engineer",
"role": "test-runner",
"authorizationTypes": ["password", "google"],
"totpEnabled": false,
"passkeyCount": 0,
"createdAt": "2024-03-15T00:00:00Z",
"lastActivity": "2024-11-14T16:05:00Z"
}
]
}Error Responses
| Status Code | Description |
|---|---|
| 403 | The caller is not an owner or admin |
Get Current User
GET/api/public/v0/users/me
Returns the user identity associated with the calling credential โ the API key creator, or the user who consented to an OAuth authorization. Available to any authenticated role.
Authentication
Requires either an API key or an OAuth Bearer token. See Authentication for more details.
Response Format
{
user: {
id: number // User ID
email: string // Email address of the user
name: string // Name of the user
avatar: string | null // Absolute URL of the avatar, null if none; fetching it requires authentication
role: string // Workspace role (`owner` | `admin` | `user` | `test-runner` | `viewer`)
}
}Example Request (API Key)
curl \
-H "Authorization: ApiKey your.api.key.here" \
https://your-company.your-region-code.qasphere.com/api/public/v0/users/meExample Request (OAuth Bearer)
curl \
-H "Authorization: Bearer your-oauth-access-token" \
https://your-company.your-region-code.qasphere.com/api/public/v0/users/meExample Response
{
"user": {
"id": 42,
"email": "you@example.com",
"name": "Your Name",
"avatar": null,
"role": "admin"
}
}