Update User Role
ユーザーのロールを変更する(admin 以上・自己変更禁止)。
PUT
/users/{user_id}/rolePath parameters
user_idstringrequiredHeader parameters
authorizationstring | anyX-Api-Keystring | anyRequest body
requiredapplication/jsonrolestringrequiredResponses
200Successful Response
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredRequest
curl -X PUT "/users/string/role" \
-H "Content-Type: application/json" \
-d '{
"role": "string"
}'const response = await fetch("/users/string/role", {
method: "PUT",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"role": "string"
})
});import requests
response = requests.put(
"/users/string/role",
headers={
"Content-Type": "application/json"
},
json={
"role": "string"
},
)Response
"string"{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}