Updates a user.
{info} Only an admin can update users.
| Method | Uri | Auth | Role |
|---|---|---|---|
PUT |
/v1/users/{uuid} |
Bearer JWT-Token |
admin |
The API requires a header Accept to be submitted with the request:
{
"Accept": "application/json",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M..."
}
{
"firstName": ["string"],
"lastName": ["string"],
"position": ["string"],
"address": ["string"],
"country": ["string"],
"institute": ["string"],
"postal": ["string"],
"phone": ["string"]
}
Condition : User must be an admin.
Code : 200 Okay
{
"firstName": "John",
"lastName": "Doe",
...
}
Condition : If the current user does not have the role admin attached.
Code : 403 Forbidden
Content example :
{
"message": "This user cannot update the requested user"
}