PATCH
/
api
/
auth
/
me
更新当前账号资料
curl --request PATCH \
  --url https://wfapi.yuhe.space/api/auth/me \
  --header 'Content-Type: application/json' \
  --cookie workflow_auth_session= \
  --data '
{
  "displayName": "<string>",
  "avatarUrl": "<string>"
}
'
{
  "errCode": 123,
  "errMessage": "<string>",
  "data": {
    "profile": {
      "userId": "<string>",
      "email": "jsmith@example.com",
      "displayName": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "roleIds": [
        "<string>"
      ],
      "roleNames": [
        "<string>"
      ],
      "permissions": [],
      "avatarUrl": "<string>",
      "createdByUserId": "<string>",
      "lastLoginAt": "2023-11-07T05:31:56Z"
    }
  }
}

Authorizations

workflow_auth_session
string
cookie
required

通过密码登录或管理员密钥登录建立的 httpOnly 浏览器会话。

Body

application/json
displayName
string
avatarUrl
string | null

Response

返回更新后的用户资料。

errCode
integer
required
errMessage
string
required
Allowed value: ""
data
object
required