Users

Good to know: All the methods shown below are synced to an example Swagger file URL and are kept up to date automatically with changes to the API.

User actions

Logs user into the system

get

/user/login

Query parameters
usernameanyrequired

The user name for login

passwordanyrequired

The password for login in clear text

Responses
curl -L \
  --url 'https://petstore.swagger.io/v2/user/login'
text

Logs out current logged in user session

get

/user/logout

Responses
curl -L \
  --url 'https://petstore.swagger.io/v2/user/logout'

No body

Creating users

Creates list of users with given input array

post

/user/createWithList

Body
idinteger · int64
usernamestring
firstNamestring
lastNamestring
emailstring
passwordstring
phonestring
userStatusinteger · int32

User Status

Responses
curl -L \
  --request POST \
  --url 'https://petstore.swagger.io/v2/user/createWithList' \
  --header 'Content-Type: application/json' \
  --data '[
    {
      "id": 1,
      "username": "text",
      "firstName": "text",
      "lastName": "text",
      "email": "text",
      "password": "text",
      "phone": "text",
      "userStatus": 1
    }
  ]'

No body

Creates list of users with given input array

post

/user/createWithArray

Body
idinteger · int64
usernamestring
firstNamestring
lastNamestring
emailstring
passwordstring
phonestring
userStatusinteger · int32

User Status

Responses
curl -L \
  --request POST \
  --url 'https://petstore.swagger.io/v2/user/createWithArray' \
  --header 'Content-Type: application/json' \
  --data '[
    {
      "id": 1,
      "username": "text",
      "firstName": "text",
      "lastName": "text",
      "email": "text",
      "password": "text",
      "phone": "text",
      "userStatus": 1
    }
  ]'

No body

Last updated