Swagger Petstore
Describe APIs in Pet Store
pet
Description for pet tag
addPet
Add a new pet to the store
Request
POST /pet
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*body | Pet object that needs to be added to the store |
Responses
Status Code | Description | Samples |
---|---|---|
405 | Invalid input |
updatePet
Update an existing pet
Request
PUT /pet
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*body | Pet object that needs to be added to the store |
Responses
Status Code | Description | Samples |
---|---|---|
400 | Invalid ID supplied |
|
404 | Pet not found |
|
405 | Validation exception |
findPetsByStatus
Finds Pets by status
Multiple status values can be provided with comma separated strings
Request
GET /pet/findByStatus?status
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*status | array | Status values that need to be considered for filter |
Responses
Status Code | Description | Samples |
---|---|---|
200 | successful operation |
|
400 | Invalid status value |
findPetsByTags
Finds Pets by tags
Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
Request
GET /pet/findByTags?tags
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*tags | array | Tags to filter by |
Responses
Status Code | Description | Samples |
---|---|---|
200 | successful operation |
|
400 | Invalid tag value |
deletePet
Deletes a pet
Request
DELETE /pet/{petId}
Parameters
Name | Type | Value | Notes |
---|---|---|---|
api_key | string | ||
*petId | integer | Pet id to delete |
Responses
Status Code | Description | Samples |
---|---|---|
400 | Invalid ID supplied |
|
404 | Pet not found |
getPetById
Find pet by ID
Returns a single pet
Request
GET /pet/{petId}
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*petId | integer | ID of pet to return |
Responses
Status Code | Description | Samples |
---|---|---|
200 | successful operation |
|
400 | Invalid ID supplied |
|
404 | Pet not found |
updatePetWithForm
Updates a pet in the store with form data
Request
POST /pet/{petId}
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*petId | integer | ID of pet that needs to be updated |
|
name | string | Updated name of the pet |
|
status | string | Updated status of the pet |
Responses
Status Code | Description | Samples |
---|---|---|
405 | Invalid input |
uploadFile
uploads an image
Request
POST /pet/{petId}/uploadImage
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*petId | integer | ID of pet to update |
|
additionalMetadata | string | Additional data to pass to server |
|
file | file | file to upload |
Responses
Status Code | Description | Samples |
---|---|---|
200 | successful operation |
store
Access to Petstore orders
Additional description for store tag
addPet
Add a new pet to the store
Request
POST /pet
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*body | Pet object that needs to be added to the store |
Responses
Status Code | Description | Samples |
---|---|---|
405 | Invalid input |
getInventory
Returns pet inventories by status
Returns a map of status codes to quantities
Request
GET /store/inventory
Responses
Status Code | Description | Samples |
---|---|---|
200 | successful operation |
placeOrder
Place an order for a pet
Request
POST /store/order
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*body | order placed for purchasing the pet |
Responses
Status Code | Description | Samples |
---|---|---|
200 | successful operation |
|
400 | Invalid Order |
deleteOrder
Delete purchase order by ID
For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
Request
DELETE /store/order/{orderId}
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*orderId | integer | ID of the order that needs to be deleted |
Responses
Status Code | Description | Samples |
---|---|---|
400 | Invalid ID supplied |
|
404 | Order not found |
getOrderById
Find purchase order by ID
For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
Request
GET /store/order/{orderId}
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*orderId | integer | ID of pet that needs to be fetched |
Responses
Status Code | Description | Samples |
---|---|---|
200 | successful operation |
|
400 | Invalid ID supplied |
|
404 | Order not found |
user
Operations about user
createUser
Create user
This can only be done by the logged in user.
Request
POST /user
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*body | Created user object |
Responses
Status Code | Description | Samples |
---|---|---|
default | successful operation |
createUsersWithArrayInput
Creates list of users with given input array
Request
POST /user/createWithArray
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*body | List of user object |
Responses
Status Code | Description | Samples |
---|---|---|
default | successful operation |
createUsersWithListInput
Creates list of users with given input array
Request
POST /user/createWithList
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*body | List of user object |
Responses
Status Code | Description | Samples |
---|---|---|
default | successful operation |
loginUser
Logs user into the system
Request
GET /user/login?username&password
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*username | string | The user name for login |
|
*password | string | The password for login in clear text |
Responses
Status Code | Description | Samples |
---|---|---|
200 | successful operation |
|
400 | Invalid username/password supplied |
logoutUser
Logs out current logged in user session
Request
GET /user/logout
Responses
Status Code | Description | Samples |
---|---|---|
default | successful operation |
deleteUser
Delete user
This can only be done by the logged in user.
Request
DELETE /user/{username}
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*username | string | The name that needs to be deleted |
Responses
Status Code | Description | Samples |
---|---|---|
400 | Invalid username supplied |
|
404 | User not found |
getUserByName
Get user by user name
Request
GET /user/{username}
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*username | string | The name that needs to be fetched. Use user1 for testing. |
Responses
Status Code | Description | Samples |
---|---|---|
200 | successful operation |
|
400 | Invalid username supplied |
|
404 | User not found |
Other APIs
| Improve this Doc View SourceupdateUser
Updated user
This can only be done by the logged in user.
Request
PUT /user/{username}
Parameters
Name | Type | Value | Notes |
---|---|---|---|
*username | string | name that need to be updated |
|
*body | Updated user object |
Responses
Status Code | Description | Samples |
---|---|---|
400 | Invalid user supplied |
|
404 | User not found |