This endpoint deals with users.
Retrieve the whole collection of users. Accepts the following filter params:
limit
: Limit the number of results per page (default: 20).page
: Select a page of results (default: 1).email
: Find a user by its email (strict matching).ids
: Get a list of users by ids.search
: Get a list of users who's first name and last name match search.
- Scope:
users:get
{
"results": [{
"id": String,
"firstName": String,
"lastName": String,
"email": String,
"fallbackEmail": String,
"description": String,
"pictureProfileUrl": String,
"createdAt": Date,
"roles": [String]
}],
"page": Number, // Requested page.
"limit": Number, // Requested limit of results per page.
"pageCount": Number // Amount of pages regarding the results per page.
}
Creates a new user. Requires to specify at least one valid role in: tech, hr, finance, com, business and board. Also requires to have either hr or board in logged user roles to perform request.
- Role:
rh
orboard
- Scope:
users:create
{
"firstName": String, // required
"lastName": String, // required
"email": String, // required
"fallbackEmail": String,
"description": String,
"plainPassword": String, // required
"roles": [String] // required
}
{
"id": String,
"firstName": String,
"lastName": String,
"email": String,
"fallbackEmail": String,
"description": String,
"pictureProfileUrl": String,
"createdAt": Date,
"roles": [String]
}
Retrieve a user.
- Scope:
users:get
orprofile:get
if self getting
{
"id": String,
"firstName": String,
"lastName": String,
"email": String,
"fallbackEmail": String,
"description": String,
"pictureProfileUrl": String,
"createdAt": Date,
"roles": [String]
}
Updates a user. Connected user can edit himself. To edit user roles, connected user requires either hr or board in his roles.
- Role:
rh
orboard
- Scope:
users:modify
orprofile:modify
if self editing
{
"firstName": String,
"lastName": String,
"email": String,
"fallbackEmail": String,
"description": String,
"roles": [String] // requires hr/board role
}
Deletes an user. To delete a user, connected user requires either hr or board in his roles.
- Role:
rh
orboard
- Scope:
users:delete
{
"deleted": Boolean,
}
Retrieve the user corresponding to given access token.
- Scope:
profile:get
{
"id": String,
"firstName": String,
"lastName": String,
"email": String,
"fallbackEmail": String,
"description": String,
"pictureProfileUrl": String,
"createdAt": Date,
"roles": [String]
}