Managing users
nile.api.users.createUser
method is used to create a new user.
email
: The email of the user to create.password
: The password of the user to create.preferredName
: Optional. The preferred name of the user to create.newTenant
: Optional. Name of a new tenant to create for the user.User
object.
Not Found
.
nile.api.users.createUser
method and the expected responses:
nile.api.users.createTenantUser
method is used to create a new user in the current tenant.
email
: The email of the user to create.password
: The password of the user to create.preferredName
: Optional. The preferred name of the user to create.newTenant
: Optional and unused.User
object.
nile.api.users.me
method is used to get information about the current user.
User
object.
nile.api.users.updateMe
method is used to update the current user.
User
object with one or more of the following properties:
nile.api.users.linkTenant
and nile.api.users.unlinkTenant
methods.
Password reset currently cannot be done via the SDK, refer to the Password Reset documentation for more information.User
object with the new values.
If unauthenticated, a promise that resolves to a Response object with 401 status code.
nile.api.users.linkUser
method is used to give an existing user access to a tenant.
id
: The ID of the user to link.tenantId
: Optional. The ID of the tenant to link the user to. If not provided, the user will be linked to the current tenant.nile.api.users.unlinkUser
method is used to remove user’s access to a tenant, without deleting the user.
userId
: The ID of the user to unlink.tenantId
: Optional. The ID of the tenant to unlink the user from. If not provided, the user will be unlinked from the current tenant.nile.api.users.listUsers
method is used to list all users in the current tenant.
User
objects if successful.nile.tenantId
is null
or undefined
).nile.api.users.updateUser
method is used to update a user. A user can only update other users in the same tenant.
User
object with one or more of the following properties:
id
is not provided, the method will use the id from nile.userId
.
nile.api.users.linkTenant
and nile.api.users.unlinkTenant
methods.
Password reset currently cannot be done via the SDK, refer to the Password Reset documentation for more information.User
object with the new values.
If unauthenticated, a promise that resolves to a Response object with 401 status code.
If the current user does not share a tenant with the user being updated, a promise that resolves to a Response object with 404 status code.