Skip to main content

Get user by username

Get a user by their username.

GET https://petstore3.swagger.io/api/v3/user/{username}

Examples

cURL
GET "https://petstore3.swagger.io/api/v3/user/user1" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"

Responses

CodeDescription
200Successful operation
400Invalid username supplied
404User not found
defaultUnexpected error
Response example

200: Successful operation

Response
{
"id": 0,
"username": "string",
"firstName": "string",
"lastName": "string",
"email": "string",
"password": "string",
"phone": "string",
"userStatus": 0
}

Parameters

Path parameters
NameTypeDescription
usernamestringThe username of the user to fetch. Use "user" for testing.