更新用户信息
接口描述
PATCH /v1/users/{user_id}
更新用户信息
请求头(Request Header)
请求参数(Request Parameters)
名称 | 位置 | 类型 | 必须 | 描述 |
---|---|---|---|---|
user_id | path | string(uuid) | true | 用户id |
update_mask | query | string(field-mask) | false | 更新标记 |
请求体(Request Body)
名称 | 位置 | 类型 | 必须 | 描述 |
---|---|---|---|---|
body | body | User | true | none |
请求示例(Request Example)
curl --request PATCH \
--url https://example.com/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--data '{"id":"string","name":"string","username":"string","phone":"string","email":"string","tenant_id":"string","tenant_code":"string","region_code":"string","password":"stringst","confirm_password":"string","remark":"string","console_state":"string","open_api_state":"string","mfa_state":"string","set_password_first_login":"string","set_password_next_login":"string","set_password_at_login":"string","ak":{"id":"string","user_id":"string","access_key":"string","secret_key":"string","status":"string","advice_renew":true},"password_updator_id":"string","password_updator_username":"string"}'
响应参数(Response Parameters)
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | User |
响应示例(Response Example)
200 Response
{
"id": "string",
"name": "string",
"username": "string",
"phone": "string",
"email": "string",
"tenant_id": "string",
"tenant_code": "string",
"region_code": "string",
"status": "string",
"source": "string",
"confirm_password": "string",
"remark": "string",
"console_state": "string",
"open_api_state": "string",
"mfa_state": "string",
"set_password_first_login": "string",
"set_password_next_login": "string",
"set_password_at_login": "string",
"ak": {
"id": "string",
"user_id": "string",
"access_key": "string",
"secret_key": "string",
"status": "string",
"advice_renew": true,
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z"
},
"set_password_time": "2019-08-24T14:15:22Z",
"last_login_time": "2019-08-24T14:15:22Z",
"create_time": "2019-08-24T14:15:22Z",
"update_time": "2019-08-24T14:15:22Z",
"join_time": "2019-08-24T14:15:22Z",
"password_updator_id": "string",
"password_updator_username": "string",
"invalid_time": "2019-08-24T14:15:22Z",
"message_phone": "string",
"message_email": "string",
"message_phone_verified": true,
"message_email_verified": true
}
数据结构(Schemas)
Ak
名称 | 类型 | 必须 | 限制 | 描述 |
---|---|---|---|---|
id | string | false | none | Ak id |
user_id | string | false | none | 用户id |
access_key | string | false | none | Access key |
secret_key | string | false | none | Secret key |
status | string | false | none | 状态 |
advice_renew | boolean | false | none | 建议更新标志 |
create_time | string(date-time) | false | read-only | 创建时间 |
update_time | string(date-time) | false | read-only | 更新时间 |
User
名称 | 类型 | 必须 | 限制 | 描述 |
---|---|---|---|---|
id | string | false | none | 用户id |
name | string | true | none | 显示名称 |
username | string | true | none | 用户名 |
phone | string | false | none | 手机号 |
string | false | none | 邮箱 | |
tenant_id | string | false | none | 租户id |
tenant_code | string | false | none | 租户标识 |
region_code | string | false | none | 地区代码 |
status | string | false | read-only | 用户状态,取值为['valid','invalid','forbidden'] |
source | string | false | read-only | 来源,取值为['build_in','ad'] |
password | string | true | write-only | 密码 |
confirm_password | string | false | none | 确认密码 |
remark | string | false | none | 备注 |
console_state | string | true | none | 控制台启用状态 |
open_api_state | string | true | none | open_api启用状态 |
mfa_state | string | true | none | mfa启用状态 |
set_password_first_login | string | true | none | 是否首次登录时重置密码 |
set_password_next_login | string | false | none | 是否下次登录重置密码 |
set_password_at_login | string | false | none | 是否首次登录时重置密码 |
ak | Ak | false | none | Ak |
set_password_time | string(date-time) | false | read-only | 修改密码时间 |
last_login_time | string(date-time) | false | read-only | 上一次登录时间 |
create_time | string(date-time) | false | read-only | 用户创建时间 |
update_time | string(date-time) | false | read-only | 用户更新时间 |
join_time | string(date-time) | false | read-only | 用户加入某个组的时间 |
password_updator_id | string | false | none | 上一次密码修改人id |
password_updator_username | string | false | none | 上一次密码修改人用户名 |
invalid_time | string(date-time) | false | read-only | 失效时间 |
message_phone | string | false | read-only | 消息通知手机号 |
message_email | string | false | read-only | 消息通知邮箱 |
message_phone_verified | boolean | false | read-only | 消息通知手机号验证状态 |
message_email_verified | boolean | false | read-only | 消息通知邮箱验证状态 |