Rate this page:
This can only be done by the logged in user.
Created user object
integer
string
string
string
string
string
string
integer
successful operation
1
2
3
4
5
6
7
8
9
10
11
12
13
curl --request POST \
--url 'https://petstore.swagger.io/v2/user' \
--header 'Content-Type: application/json' \
--data '{
"id": 2154,
"username": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"password": "<string>",
"phone": "<string>",
"userStatus": 11
}'
List of user object
array<User>
integer
string
string
string
string
string
string
integer
successful operation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
curl --request POST \
--url 'https://petstore.swagger.io/v2/user/createWithArray' \
--header 'Content-Type: application/json' \
--data '[
{
"id": 2154,
"username": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"password": "<string>",
"phone": "<string>",
"userStatus": 11
}
]'
List of user object
array<User>
integer
string
string
string
string
string
string
integer
successful operation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
curl --request POST \
--url 'https://petstore.swagger.io/v2/user/createWithList' \
--header 'Content-Type: application/json' \
--data '[
{
"id": 2154,
"username": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"password": "<string>",
"phone": "<string>",
"userStatus": 11
}
]'
string
Requiredstring
Requiredsuccessful operation
integer
string
string
1
2
3
curl --request GET \
--url 'https://petstore.swagger.io/v2/user/login?username={username}&password={password}' \
--header 'Accept: application/xml'
1
"<string>"
This request has no parameters.
successful operation
1
2
curl --request GET \
--url 'https://petstore.swagger.io/v2/user/logout'
string
Requiredsuccessful operation
1
2
3
curl --request GET \
--url 'https://petstore.swagger.io/v2/user/{username}' \
--header 'Accept: application/xml'
1
2
3
4
5
6
7
8
9
10
{
"id": 2154,
"username": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"password": "<string>",
"phone": "<string>",
"userStatus": 11
}
This can only be done by the logged in user.
string
RequiredUpdated user object
integer
string
string
string
string
string
string
integer
Invalid user supplied
1
2
3
4
5
6
7
8
9
10
11
12
13
curl --request PUT \
--url 'https://petstore.swagger.io/v2/user/{username}' \
--header 'Content-Type: application/json' \
--data '{
"id": 2154,
"username": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"password": "<string>",
"phone": "<string>",
"userStatus": 11
}'
This can only be done by the logged in user.
string
RequiredInvalid username supplied
1
2
curl --request DELETE \
--url 'https://petstore.swagger.io/v2/user/{username}'