Skip to Content
bpms.ai

Users

List, read, create, update, disable, enable, and delete the users of a tenant, and reset their passwords.

The users of BPMS are the users of BPMS 3.x: the same accounts, with the same roles and tenants. The operations below work on the users of your tenant only, and require the BPMS 3.x authorities of the user administration.

OperationCallAuthority
List the usersGET /api/v1/access/users6.2.2.4 (View users)
Read a userGET /api/v1/access/users/{userId}6.2.2.4
Create a userPOST /api/v1/access/users6.2.2.1 (Create users) and every code of the user's roles
Update a userPATCH /api/v1/access/users/{userId}6.2.2.2 (Edit users)
Disable or enable a userPOST /api/v1/access/users/{userId}/disable, .../enable6.2.2.2
Delete a userDELETE /api/v1/access/users/{userId}6.2.2.3 (Delete users)
Reset a user's passwordPOST /api/v1/access/users/{userId}/password6.2.2.2 and every code of the user's roles

Roles are assigned to users and removed from them on Roles and authorities.

List the users

curl -sS -H "Authorization: Bearer $TOKEN" "$BPMS_URL/api/v1/access/users?page=0&size=20&sort=userName"

page starts at 0, size is 20 by default and at most 100, and sort is userName (the default) or id. Disabled users are listed; deleted users are not. The answer is one page:

{
  "items": [
    {"id": 7, "userName": "jdoe", "name": "Jane", "lastName": "Doe", "identification": "1020304050",
     "email": "jdoe@example.com", "enabled": true, "locked": false, "passwordChangeRequired": false}
  ],
  "page": 0, "size": 20, "totalElements": 1, "totalPages": 1
}

Read a user

curl -sS -H "Authorization: Bearer $TOKEN" "$BPMS_URL/api/v1/access/users/7"

It answers 200 with the same fields as an item of the list.

Create a user

Put the new user in a user.json file kept out of version control, so the password stays out of your shell history:

{"userName": "jdoe", "name": "Jane", "lastName": "Doe", "identification": "1020304050",
 "email": "jdoe@example.com", "password": "<password>", "roleIds": [3]}
curl -sS -X POST -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  "$BPMS_URL/api/v1/access/users" -d @user.json

It answers 201 with the new user and its address in the Location header.

FieldRule
userNameRequired, at most 255 characters, unique across the installation in any case.
name, lastNameRequired, at most 255 characters.
identificationRequired, at most 15 letters and digits, unique in the tenant.
emailOptional, at most 255 characters. When the installation requires it (BPMS_ACCESS_USERS_EMAILREQUIRED=true), it is required and unique in the tenant.
passwordRequired, following the password policy below.
roleIdsAt least one role of your tenant. You can only give roles whose codes you hold.
mustChangePasswordtrue by default: the user must change the password at the first sign-in.
enabledtrue by default.
lockedfalse by default. With true, the user is created locked and cannot sign in until unlocked.

Unless the tenant has unlimited users, its BPMS 3.x license caps the number of enabled users. When the tenant has no free place, an enabled user is refused with access.user-capacity-reached; a user created disabled takes no place.

Update a user

curl -sS -X PATCH -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  "$BPMS_URL/api/v1/access/users/7" -d '{"lastName": "Smith"}'

The body carries any of userName, name, lastName, identification, and email, with the rules of creating a user; a field left out keeps its value, and an empty email removes it unless the installation requires it. It answers 200 with the user. Roles, password, and status have their own operations. A user may update itself.

Disable, enable, and delete a user

curl -sS -X POST -H "Authorization: Bearer $TOKEN" "$BPMS_URL/api/v1/access/users/7/disable"
curl -sS -X POST -H "Authorization: Bearer $TOKEN" "$BPMS_URL/api/v1/access/users/7/enable"
curl -sS -X DELETE -H "Authorization: Bearer $TOKEN" "$BPMS_URL/api/v1/access/users/7"

Each answers 204, also when nothing changes.

  • Disabling and deleting close at once all the user's sessions, including those of AI agents. Enabling the user again does not reopen them.
  • Enabling needs a free place in the tenant's license.
  • Deleting keeps the user in the database, marked as deleted, as BPMS 3.x does; the user is no longer listed and answers 404 from then on.
  • You cannot disable or delete yourself.

Reset a user's password

Put the new password in a password.json file kept out of version control:

{"password": "<new password>", "mustChangePassword": true}
curl -sS -X POST -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  "$BPMS_URL/api/v1/access/users/7/password" -d @password.json

It answers 204. The administrator chooses the new password; BPMS neither generates nor returns one.

  • mustChangePassword is true by default, so the user must change the password at the next sign-in; false lets the user sign in normally.
  • It closes all the user's sessions, including those of AI agents.
  • It does not unlock a locked user.
  • You cannot reset your own password; change it as described in Authentication.

Password policy

Every new password, set when creating a user, resetting one, or changing your own, follows the installation's policy. Its defaults are the BPMS 3.x rule:

VariableDefaultRule
BPMS_ACCESS_PASSWORD_MINLENGTH8The minimum number of characters.
BPMS_ACCESS_PASSWORD_MAXLENGTH100The maximum number of characters, between the minimum and 1024.
BPMS_ACCESS_PASSWORD_REQUIRELOWERtrueA lowercase letter.
BPMS_ACCESS_PASSWORD_REQUIREUPPERtrueAn uppercase letter.
BPMS_ACCESS_PASSWORD_REQUIREDIGITtrueA digit.
BPMS_ACCESS_PASSWORD_REQUIRESYMBOLtrueOne of - + _ ! @ # $ % ^ & * . , ? or a space.

A line break is always refused. A password that breaks the policy answers 400 with one error per broken rule.

Rules and errors

Every change, and every refusal for a missing authority, is recorded in the audit log. A refused request changes nothing.

StatuscodeWhen
400core.validation-failedA field or parameter is missing or invalid, or the password breaks the policy; errors lists each one.
401core.authentication-requiredThe call has no valid token.
403core.authority-requiredThe caller lacks the authority the operation requires, or a code of the roles involved.
404access.user-not-foundThe user does not exist in your tenant or is deleted.
409access.username-takenAnother user of the installation has this username, in any case.
409access.identification-takenAnother user of the tenant has this identification.
409access.email-takenAnother user of the tenant has this email, while the email is required.
409access.user-capacity-reachedThe tenant has no free place for another enabled user.
409access.user-self-changeYou tried to disable, delete, or reset the password of yourself.
409access.user-changedThe user's roles changed during a password reset; try again.

In the OpenAPI document, the operations are listUsers, getUser, createUser, updateUser, disableUser, enableUser, deleteUser, and resetUserPassword, under the access tag.

On this page