Ana içeriğe geç
Versiyon: 1.0.8

Users

Users are owned by the Organization service and are reached directly under /api/v1, not under a module prefix.

Base path: https://api.rabbitqa.com/api/v1/users

The signed-in user​

curl https://api.rabbitqa.com/api/v1/users/me \
-H "Authorization: Bearer $TOKEN"
MethodPathPurpose
GET/users/meThe signed-in account
GET/users/me/permissionsPermission keys held by the signed-in user

GET /api/v1/permissions/me returns the same permission set and is equivalent. Use it to decide what to show in a client rather than assuming a role implies a capability — permissions are granted per role and can be customized.

Listing and lookup​

MethodPathPurpose
GET/usersList users in the company
GET/users/filter-optionsValues available to filter the list on
GET/users/{id}Retrieve one user
GET/users/emailLook up by email address
POST/users/{username}/availableCheck whether a username is free
GET/users/validateValidate the current session

Inviting and creating​

curl -X POST https://api.rabbitqa.com/api/v1/users/invite \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "email": "[email protected]", "roleIds": [4] }'
MethodPathPurpose
POST/users/inviteInvite a user by email
PUT/users/activateActivate an invited account
POST/users/activateActivate an invited account

An invited user is created in a passive state and becomes active once the invitation is accepted. Both endpoints accept application/json, and multipart/form-data when a profile image is included.

Updating a user​

MethodPathPurpose
PUT/users/{id}Update a user
PUT/users/{id}/profileUpdate profile fields
PUT/users/{id}/rolesReplace the user's roles
PUT/users/{id}/statusActivate or deactivate
PATCH/users/{id}/adminGrant or revoke administrator
PUT/users/{id}/companiesChange company membership
DELETE/users/{id}Delete a user

Passwords​

MethodPathPurpose
PUT/users/passwordChange your own password
PUT/users/{id}/passwordChange another user's password

Password reset for a signed-out user goes through POST /api/v1/auth/forgot-password and POST /api/v1/auth/reset-password. See Authentication.

Profile image​

MethodPathPurpose
GET/users/{id}/imageRetrieve the profile image
DELETE/users/{id}/imageRemove the profile image

Sign-in history​

MethodPathPurpose
GET/users/user-login-logs/{user-id}Sign-in log for one user

Roles and groups​

  • Roles: GET|POST /api/v1/roles, GET|PUT|DELETE /api/v1/roles/{id}, GET /api/v1/roles/{id}/users
  • Teams: GET|POST /api/v1/teams, POST|DELETE /api/v1/teams/{id}/members/{userId}
  • User groups inside test management: /tmt/company/api/v1/userGroups

Workspace-level role assignment is done through the workspace endpoints — see Workspaces.