User

Endpoints for managing users.

'/users'

POST

async signUp(
    @requestBody({
      content: {
        'application/json': {
          schema: getModelSchemaRef(User, {
            title: 'NewUser',
          }),
        },
      },
    })
    newUser: User,
  ): Promise<User>

Auth: No

Create a new user and send verification email.

GET

Auth: Yes RBAC: Admin

Get all users.

'/users/{id}'

GET

Auth: Yes RBAC: Admin, User (owner)

Get a specific user by ID.

DEL

Auth: Yes RBAC: Admin, User (owner)

Delete a specific user by ID.

PATCH

Auth: Yes RBAC: Admin, User (owner)

Update a specific user by ID.

'/users/login'

POST

Auth: No

Try to authenticate as a user.

'/whoAmI'

GET

Auth: Yes

Check user profile for debugging purposes.

'/users/logout'

POST

Auth: Yes

Unauthenticate and log out of user account.

'/users/api-token'

GET

Auth: Yes

Get API tokens.

'/users/verify-email'

POST

Auth: No

Request a new verification email to be send for the given user.

'/users/verify'

GET

Auth: No

Verify a user's email using the token from the verification email.

'/users/forgot-password'

POST

Auth: No

Request a password reset email to be sent to the user's email.

'/users/change-password'

POST

Auth: Yes RBAC: Admin, User (owner)

Change a given user's password.

'/users/reset-password'

POST

Auth: No

Reset a given user's password using the reset token from the reset password email.

'/users/creds-taken'

POST

Auth: No

Check if a set of user credentials are taken.

Last updated