ユーザー名でユーザーを取得する
ユーザー名に基づいてユーザー情報を取得します。
GET https://petstore3.swagger.io/api/v3/user/{username}
例
- API Key
- OAuth 2.0
cURL
GET "https://petstore3.swagger.io/api/v3/user/user1" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"
cURL
GET "https://petstore3.swagger.io/api/v3/user/user1" \
-H "accept: application/json" \
-H "Authorization: Bearer <YOUR_OAUTH_TOKEN>"
レスポンス
| コード | 説明 |
|---|---|
| 200 | 操作成功 |
| 400 | 無効なユーザー名が指定されました |
| 404 | ユーザーが見つかりません |
| default | 予期せぬエラー |
レスポンス例
200: 操作成功
Response
{
"id": 0,
"username": "文字列",
"firstName": "文字列",
"lastName": "文字列",
"email": "文字列",
"password": "文字列",
"phone": "文字列",
"userStatus": 0
}
パラメータ
パスパラメータ
| 名前 | タイプ | 説明 |
|---|---|---|
username | 文字列 | 取得対象のユーザーのユーザー名。テスト時は "user" を使用してください。 |