4.9 KiB
UserApi
All URIs are relative to http://petstore.swagger.io/v2
Method | HTTP request | Description |
---|---|---|
createUser | POST /user | Create user |
createUsersWithArrayInput | POST /user/createWithArray | Creates list of users with given input array |
createUsersWithListInput | POST /user/createWithList | Creates list of users with given input array |
deleteUser | DELETE /user/{username} | Delete user |
getUserByName | GET /user/{username} | Get user by user name |
loginUser | GET /user/login | Logs user into the system |
logoutUser | GET /user/logout | Logs out current logged in user session |
updateUser | PUT /user/{username} | Updated user |
createUser
createUser(body)
Create user
This can only be done by the logged in user.
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | User | Created user object |
Return type
null (empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
createUsersWithArrayInput
createUsersWithArrayInput(body)
Creates list of users with given input array
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | List | List of user object |
Return type
null (empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
createUsersWithListInput
createUsersWithListInput(body)
Creates list of users with given input array
Parameters
Name | Type | Description | Notes |
---|---|---|---|
body | List | List of user object |
Return type
null (empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
deleteUser
deleteUser(username)
Delete user
This can only be done by the logged in user.
Parameters
Name | Type | Description | Notes |
---|---|---|---|
username | String | The name that needs to be deleted | [default to null] |
Return type
null (empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
getUserByName
User getUserByName(username)
Get user by user name
Parameters
Name | Type | Description | Notes |
---|---|---|---|
username | String | The name that needs to be fetched. Use user1 for testing. | [default to null] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/xml, application/json
loginUser
String loginUser(username, password)
Logs user into the system
Parameters
Name | Type | Description | Notes |
---|---|---|---|
username | String | The user name for login | [default to null] |
password | String | The password for login in clear text | [default to null] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/xml, application/json
logoutUser
logoutUser()
Logs out current logged in user session
Parameters
This endpoint does not need any parameter.
Return type
null (empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
updateUser
updateUser(username, body)
Updated user
This can only be done by the logged in user.
Parameters
Name | Type | Description | Notes |
---|---|---|---|
username | String | name that need to be deleted | [default to null] |
body | User | Updated user object |
Return type
null (empty response body)
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined