Users REST API
List users
โ ๏ธ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.
List all users. The user must be an admin on the server to use this route. The HTTP response header `X-Total-Count` contains the total number of users.
Headers
Content-Typestring
Set to application/json.
Authorizationstring
Set to Bearer BENCHER_API_KEY, where BENCHER_API_KEY is a valid Bencher API key (or a deprecated API token).
Query Parameters
directionstring
The direction to sort by. If not specified, the default sort direction is used.
Default: asc
One of: asc, desc
pageinteger
The page number to return. If not specified, the first page is returned.
Default: 1
per_pageinteger
The number of items to return per page. If not specified, the default number of items per page (8) is used.
Default: 8
sortstring
The field to sort by. If not specified, the default sort field is used.
Default: name
One of: name
namestring
Filter by user name, exact match.
searchstring
Search by user name, slug, or UUID.
/v0/users| Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:6610 |
Bencher CLI
bencher user listView OpenAPI Spec
View a user
โ ๏ธ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.
View a user. Only the authenticated user themselves and server admins have access to this endpoint. To view users within your organization, use the organization members endpoints.
Headers
Content-Typestring
Set to application/json.
Authorizationstring
Set to Bearer BENCHER_API_KEY, where BENCHER_API_KEY is a valid Bencher API key (or a deprecated API token).
Path Parameters
userThe slug or UUID for a user.
/v0/users/{user}| Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:6610 |
Bencher CLI
bencher user view USERView OpenAPI Spec
Update a user
โ ๏ธ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.
Update a user. Only the authenticated user themselves and server admins have access to this endpoint. Some fields can only be updated by an admin. Changing the email, admin, or locked field requires a user session, even for an admin: neither a user API key nor a deprecated user API token can change them. Changing any of them also needs a sign-in within the last 10 minutes. A user's new email for themselves takes effect only once it is confirmed from a link sent to that email, good once in the next 30 minutes, so until then the response shows the current email; the current email is told of it at once. Asking again ends the earlier link. Confirming revokes the user's deprecated API tokens and ends every session of theirs but the one that asked. A server admin's change to another user's email takes effect at once: both emails are told of it, the user's deprecated API tokens are revoked, and every session of theirs ends. That change, or a lock, also ends any email change the user asked for. To manage users within your organization, use the organization members endpoints.
Headers
Content-Typestring
Set to application/json.
Authorizationstring
Set to Bearer BENCHER_API_KEY, where BENCHER_API_KEY is a valid Bencher API key (or a deprecated API token).
Path Parameters
userThe slug or UUID for a user.
Body Parameters
adminboolean
Update whether the user is an admin. Must be an admin to update this field.
emailstring
The new email for the user. A user's new email for themselves takes effect once it is confirmed from a link sent to it. A server admin's change to another user's email takes effect at once.
lockedboolean
Update whether the user is locked. Must be an admin to update this field.
namestring
The new name of the user. Maximum length is 64 characters. May only contain letters, marks, and numbers of any script, non-leading or trailing spaces, and the following characters: _ , . - '
slugThe preferred new slug for the user. Maximum length is 64 characters.
/v0/users/{user}| Bencher Cloud | https://api.bencher.dev |
| Bencher Self-Hosted | http://localhost:6610 |
Bencher CLI
bencher user update USERView OpenAPI Spec