PATCH
/api/users/{user_id}
curl \
-X PATCH https://lztup.toil.cc/api/users/{user_id} \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"username":"string","password":"string","role_id":42}'
Request example
{
"username": "string",
"password": "string",
"role_id": 42
}
Request examples
{
"username": "string",
"password": "string",
"role_id": 42
}
Response examples (200)
{
"user_id": 42,
"username": "string",
"avatar": "string",
"role_id": 42,
"created_at": 42
}
Response examples (503)
{
"detail": "Can't connect to MySQL server on '[SERVER]'"
}
Response examples (400)
{
"detail": "Duplicate entry '...' for key '...'"
}
Response examples (401)
{
"detail": "Couldn't validate credentials"
}
Response examples (403)
{
"detail": "Not authenticated"
}
Response examples (422)
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}