Auth service
Users
5 endpoints.
PATCH
/api/v1/users/{user_id}/roleUpdate User Role
Update another user's role. Restricted to Admin User.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
user_idrequired | path | string (uuid) |
Request bodyrequired
application/jsonUserRoleUpdate| Field | Type | Description |
|---|---|---|
role_idrequired | integer |
Responses
200Successful Responseapplication/jsonUserResponse| Field | Type | Description |
|---|---|---|
emailrequired | string (email) | |
first_name | string | null | |
last_name | string | null | |
is_active | boolean | null | default true |
idrequired | string (uuid) | |
role_idrequired | integer | |
created_atrequired | string (date-time) | |
updated_atrequired | string (date-time) | |
avatar_url | string | null |
422Validation Error
Error bodies: HTTPValidationError. See Errors.
GET
/api/v1/users/current_userRead Current User
Get current user.
Responses
200Successful Responseapplication/jsonUserResponseUserResponse, expanded above.
PUT
/api/v1/users/current_userUpdate Current User
Update own profile.
Request bodyrequired
application/jsonUserUpdate| Field | Type | Description |
|---|---|---|
first_name | string | null | |
last_name | string | null | |
email | string (email) | null | |
password | string | null | |
old_password | string | null |
Responses
200Successful Responseapplication/jsonUserResponseUserResponse, expanded above.
422Validation Error
Error bodies: HTTPValidationError. See Errors.
POST
/api/v1/users/current_user/avatarUpload Current User Avatar
Upload own profile avatar (multipart/form-data).
Request bodyrequired
multipart/form-dataBody_upload_current_user_avatar_api_v1_users_current_user_avatar_post| Field | Type | Description |
|---|---|---|
filerequired | string (binary) |
Responses
200Successful Responseapplication/jsonUserResponseUserResponse, expanded above.
422Validation Error
Error bodies: HTTPValidationError. See Errors.
DELETE
/api/v1/users/current_user/avatarDelete Current User Avatar
Remove own profile avatar.
Responses
200Successful Responseapplication/jsonUserResponseUserResponse, expanded above.