GetById() [UserManager]
Get a user by Id
Description
The GetById() method is used to get a user by user Id.
Package Details
Interface
IUserManager
Syntax
await _userManager.GetById(User user)
Returns
Task<User>
API
GET
/api/v1/users/{id}
Parameters
Parameter | Description | Parameter Type |
---|---|---|
id | The user Id | Path |
Returns
On success, 200 Ok
If UserManage.GetById() returns null, 422 Unprocessable Entity
On error, 400 Bad Request
On authorization error, 403 Forbidden
Example
int userId = 1;
await _userManager.GetById(userId);