| Base URL |
http://petstore.swagger.io/v2 |
| Version | 1.0.0 |
| Description | This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key |
| Contact Email | apiteam@swagger.io |
| License | Apache 2.0 |
| Terms Of Service | http://swagger.io/terms/ |
| Index | Method | Path | Summary |
|---|---|---|---|
| 1 | PUT | /pet | Update an existing pet |
| 2 | POST | /pet | Add a new pet to the store |
| 3 | GET | /pet/findByStatus | Finds Pets by status |
| 4 | GET | /pet/findByTags | Finds Pets by tags |
| 5 | DELETE | /pet/{petId} | Deletes a pet |
| 6 | POST | /pet/{petId} | Updates a pet in the store with form data |
| 7 | GET | /pet/{petId} | Find pet by ID |
| 8 | POST | /pet/{petId}/uploadImage | uploads an image |
| Index | Method | Path | Summary |
|---|---|---|---|
| 1 | GET | /store/inventory | Returns pet inventories by status |
| 2 | POST | /store/order | Place an order for a pet |
| 3 | DELETE | /store/order/{orderId} | Delete purchase order by ID |
| 4 | GET | /store/order/{orderId} | Find purchase order by ID |
| Index | Method | Path | Summary |
|---|---|---|---|
| 1 | POST | /user | Create user |
| 2 | POST | /user/createWithArray | Creates list of users with given input array |
| 3 | POST | /user/createWithList | Creates list of users with given input array |
| 4 | GET | /user/login | Logs user into the system |
| 5 | GET | /user/logout | Logs out current logged in user session |
| 6 | DELETE | /user/{username} | Delete user |
| 7 | PUT | /user/{username} | Updated user |
| 8 | GET | /user/{username} | Get user by user name |
| Summary | Update an existing pet |
| Notes | |
| Consumes | application/json,application/xml |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| body | body |
Pet
|
Y | Pet object that needs to be added to the store |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| 400 | Invalid ID supplied | |
| 404 | Pet not found | |
| 405 | Validation exception |
| Summary | Add a new pet to the store |
| Notes | |
| Consumes | application/json,application/xml |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| body | body |
Pet
|
Y | Pet object that needs to be added to the store |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| 405 | Invalid input |
| Summary | Finds Pets by status |
| Notes | Multiple status values can be provided with comma separated strings |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| status | query |
array
|
Y | Status values that need to be considered for filter |
| HTTP Status Code | Reason | Response Type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | successful operation |
array[Pet]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | Invalid status value |
| Summary | Finds Pets by tags |
| Notes | Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| tags | query |
array
|
Y | Tags to filter by |
| HTTP Status Code | Reason | Response Type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | successful operation |
array[Pet]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | Invalid tag value |
| Summary | Deletes a pet |
| Notes | |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| api_key | header |
string
|
N | |
| petId | path |
int64
|
Y | Pet id to delete |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| 400 | Invalid ID supplied | |
| 404 | Pet not found |
| Summary | Updates a pet in the store with form data |
| Notes | |
| Consumes | application/x-www-form-urlencoded |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| petId | path |
int64
|
Y | ID of pet that needs to be updated |
| name | formData |
string
|
N | Updated name of the pet |
| status | formData |
string
|
N | Updated status of the pet |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| 405 | Invalid input |
| Summary | Find pet by ID |
| Notes | Returns a single pet |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| petId | path |
int64
|
Y | ID of pet to return |
| HTTP Status Code | Reason | Response Type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | successful operation |
Pet
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | Invalid ID supplied | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | Pet not found |
| Summary | uploads an image |
| Notes | |
| Consumes | multipart/form-data |
| Produces | application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| petId | path |
int64
|
Y | ID of pet to update |
| additionalMetadata | formData |
string
|
N | Additional data to pass to server |
| file | formData |
file
|
N | file to upload |
| HTTP Status Code | Reason | Response Type | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | successful operation |
ApiResponse
|
| Summary | Returns pet inventories by status |
| Notes | Returns a map of status codes to quantities |
| Consumes | |
| Produces | application/json |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| 200 | successful operation |
object
|
| Summary | Place an order for a pet |
| Notes | |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| body | body |
Order
|
Y | order placed for purchasing the pet |
| HTTP Status Code | Reason | Response Type | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | successful operation |
Order
|
||||||||||||||||||||||||||||||||||||||||||
| 400 | Invalid Order |
| Summary | Delete purchase order by ID |
| Notes | For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| orderId | path |
int64
|
Y | ID of the order that needs to be deleted |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| 400 | Invalid ID supplied | |
| 404 | Order not found |
| Summary | Find purchase order by ID |
| Notes | For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| orderId | path |
int64
|
Y | ID of pet that needs to be fetched |
| HTTP Status Code | Reason | Response Type | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | successful operation |
Order
|
||||||||||||||||||||||||||||||||||||||||||
| 400 | Invalid ID supplied | |||||||||||||||||||||||||||||||||||||||||||
| 404 | Order not found |
| Summary | Create user |
| Notes | This can only be done by the logged in user. |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| body | body |
User
|
Y | Created user object |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| default | successful operation |
| Summary | Creates list of users with given input array |
| Notes | |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| body | body |
array[User]
|
Y | List of user object |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| default | successful operation |
| Summary | Creates list of users with given input array |
| Notes | |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| body | body |
array[User]
|
Y | List of user object |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| default | successful operation |
| Summary | Logs user into the system |
| Notes | |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| username | query |
string
|
Y | The user name for login |
| password | query |
string
|
Y | The password for login in clear text |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| 200 | successful operation |
string
|
| 400 | Invalid username/password supplied |
| Summary | Logs out current logged in user session |
| Notes | |
| Consumes | |
| Produces | application/xml,application/json |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| default | successful operation |
| Summary | Delete user |
| Notes | This can only be done by the logged in user. |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| username | path |
string
|
Y | The name that needs to be deleted |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| 400 | Invalid username supplied | |
| 404 | User not found |
| Summary | Updated user |
| Notes | This can only be done by the logged in user. |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| username | path |
string
|
Y | name that need to be updated | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| body | body |
User
|
Y | Updated user object |
| HTTP Status Code | Reason | Response Type |
|---|---|---|
| 400 | Invalid user supplied | |
| 404 | User not found |
| Summary | Get user by user name |
| Notes | |
| Consumes | |
| Produces | application/xml,application/json |
| Name | Parameter Type | Data Type | Required | Description |
|---|---|---|---|---|
| username | path |
string
|
Y | The name that needs to be fetched. Use user1 for testing. |
| HTTP Status Code | Reason | Response Type | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | successful operation |
User
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | Invalid username supplied | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | User not found |