Keystone Developers
Open Keystone
API reference

Auth service

Users

5 endpoints.

PATCH/api/v1/users/{user_id}/role

Update User Role

Update another user's role. Restricted to Admin User.

Parameters

NameInTypeDescription
user_idrequiredpathstring (uuid)

Request bodyrequired

application/jsonUserRoleUpdate
FieldTypeDescription
role_idrequiredinteger

Responses

200Successful Response
application/jsonUserResponse
FieldTypeDescription
emailrequiredstring (email)
first_namestring | null
last_namestring | null
is_activeboolean | nulldefault true
idrequiredstring (uuid)
role_idrequiredinteger
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)
avatar_urlstring | null
  • 422Validation Error

Error bodies: HTTPValidationError. See Errors.

GET/api/v1/users/current_user

Read Current User

Get current user.

Responses

200Successful Response
application/jsonUserResponse

UserResponse, expanded above.

PUT/api/v1/users/current_user

Update Current User

Update own profile.

Request bodyrequired

application/jsonUserUpdate
FieldTypeDescription
first_namestring | null
last_namestring | null
emailstring (email) | null
passwordstring | null
old_passwordstring | null

Responses

200Successful Response
application/jsonUserResponse

UserResponse, expanded above.

  • 422Validation Error

Error bodies: HTTPValidationError. See Errors.

POST/api/v1/users/current_user/avatar

Upload 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
FieldTypeDescription
filerequiredstring (binary)

Responses

200Successful Response
application/jsonUserResponse

UserResponse, expanded above.

  • 422Validation Error

Error bodies: HTTPValidationError. See Errors.

DELETE/api/v1/users/current_user/avatar

Delete Current User Avatar

Remove own profile avatar.

Responses

200Successful Response
application/jsonUserResponse

UserResponse, expanded above.