This can only be done by the logged in user.
Forge and OAuth2 apps cannot access this REST resource.
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
}'
Forge and OAuth2 apps cannot access this REST resource.
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
}
]'
Forge and OAuth2 apps cannot access this REST resource.
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
}
]'
Forge and OAuth2 apps cannot access this REST resource.
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>"
Forge and OAuth2 apps cannot access this REST resource.
This request has no parameters.
successful operation
1
2
curl --request GET \
--url 'https://petstore.swagger.io/v2/user/logout'
Forge and OAuth2 apps cannot access this REST resource.
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.
Forge and OAuth2 apps cannot access this REST resource.
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.
Forge and OAuth2 apps cannot access this REST resource.
string
RequiredInvalid username supplied
1
2
curl --request DELETE \
--url 'https://petstore.swagger.io/v2/user/{username}'
Rate this page: