ユーザー情報を更新する
ユーザー情報を更新します。
PUT https://petstore3.swagger.io/api/v3/user/{username}
例
- API Key
- OAuth 2.0
cURL
PUT "https://petstore3.swagger.io/api/v3/user/user1" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "api_key: <YOUR_API_KEY>" \
-d '{
"id": 0,
"username": "user1",
"firstName": "文字列",
"lastName": "文字列",
"email": "文字列",
"password": "文字列",
"phone": "文字列",
"userStatus": 0
}'
cURL
PUT "https://petstore3.swagger.io/api/v3/user/user1" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>" \
-d '{
"id": 0,
"username": "user1",
"firstName": "文字列",
"lastName": "文字列",
"email": "文字列",
"password": "文字列",
"phone": "文字列",
"userStatus": 0
}'
レスポンス
| コード | 説明 |
|---|---|
| 200 | 操作成功 |
| 400 | 無効なユーザーが指定されました |
| 404 | ユーザーが見つかりません |
| default | 予期せぬエラー |
更新が成功すると、レスポンス本文なしで 200 ステータスコードが返されます。
パラメータ
パスパラメータ
| 名前 | タイプ | 説明 |
|---|---|---|
username | 文字列 | 更新対象のユーザーのユーザー名 |
リクエスト本文
| 名前 | タイプ | 説明 |
|---|---|---|
body | User オブジェクト | 必須。 更新情報を含む User オブジェクト。 |