Swagger Petstore
Base URL: /v2, Version: 1.0.0
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 special-key
to test the authorization filters.
Summary
Tag: pet
Everything about your Pets
Operation | Description |
---|---|
POST /pet |
Add a new pet to the store |
PUT /pet |
Update an existing pet |
GET /pet/findByStatus |
Finds Pets by status |
GET /pet/findByTags |
Finds Pets by tags |
GET /pet/{petId} |
Find pet by ID |
POST /pet/{petId} |
Updates a pet in the store with form data |
DELETE /pet/{petId} |
Deletes a pet |
POST /pet/{petId}/uploadImage |
uploads an image |
Tag: store
Access to Petstore orders
Operation | Description |
---|---|
GET /store/inventory |
Returns pet inventories by status |
POST /store/order |
Place an order for a pet |
GET /store/order/{orderId} |
Find purchase order by ID |
DELETE /store/order/{orderId} |
Delete purchase order by ID |
Tag: user
Operations about user
Operation | Description |
---|---|
POST /user |
Create user |
POST /user/createWithArray |
Creates list of users with given input array |
POST /user/createWithList |
Creates list of users with given input array |
GET /user/login |
Logs user into the system |
GET /user/logout |
Logs out current logged in user session |
GET /user/{username} |
Get user by user name |
PUT /user/{username} |
Updated user |
DELETE /user/{username} |
Delete user |
Security
petstore_auth
Type: oauth2- Flow:
-
implicit
- AuthorizationUrl:
-
http://petstore.swagger.io/oauth/dialog
- Scopes:
-
write:pets: modify pets in your account
-
read:pets: read your pets
api_key
Type: apiKey- Name:
-
api_key
- In:
-
header
Paths
application/jsonapplication/xml
Pet object that needs to be added to the store
application/xmlapplication/json
- 405 Method Not Allowed
-
Invalid input
petstore_auth | write:pets , read:pets |
application/jsonapplication/xml
Pet object that needs to be added to the store
application/xmlapplication/json
- 400 Bad Request
-
Invalid ID supplied
- 404 Not Found
-
Pet not found
- 405 Method Not Allowed
-
Validation exception
petstore_auth | write:pets , read:pets |
Multiple status values can be provided with comma separated strings
status |
Status values that need to be considered for filter |
query | string[] ,
multiple parameters (status=aaa&status=bbb )
|
application/xmlapplication/json
- 200 OK
-
successful operation
- 400 Bad Request
-
Invalid status value
petstore_auth | write:pets , read:pets |
Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
tags |
Tags to filter by |
query | string[] ,
multiple parameters (tags=aaa&tags=bbb )
|
application/xmlapplication/json
- 200 OK
-
successful operation
- 400 Bad Request
-
Invalid tag value
petstore_auth | write:pets , read:pets |
api_key | header | string | ||
petId |
Pet id to delete |
path | integer (int64) |
application/xmlapplication/json
- 400 Bad Request
-
Invalid ID supplied
- 404 Not Found
-
Pet not found
petstore_auth | write:pets , read:pets |
application/x-www-form-urlencoded
petId |
ID of pet that needs to be updated |
path | integer (int64) | |
name |
Updated name of the pet |
formData | string | |
status |
Updated status of the pet |
formData | string |
application/xmlapplication/json
- 405 Method Not Allowed
-
Invalid input
petstore_auth | write:pets , read:pets |
multipart/form-data
petId |
ID of pet to update |
path | integer (int64) | |
additionalMetadata |
Additional data to pass to server |
formData | string | |
file |
file to upload |
formData | file |
application/json
- 200 OK
-
successful operation
petstore_auth | write:pets , read:pets |
Returns a map of status codes to quantities
application/json
- 200 OK
-
successful operation
integer (int32)
api_key |
For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
orderId |
ID of the order that needs to be deleted |
path | integer (int64) , { x ∈ ℤ | x ≥ 1 } |
application/xmlapplication/json
- 400 Bad Request
-
Invalid ID supplied
- 404 Not Found
-
Order not found
For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
orderId |
ID of pet that needs to be fetched |
path | integer (int64) , { x ∈ ℤ | 1 ≤ x ≤ 10 } |
application/xmlapplication/json
- 200 OK
-
successful operation
- 400 Bad Request
-
Invalid ID supplied
- 404 Not Found
-
Order not found
This can only be done by the logged in user.
Created user object
application/xmlapplication/json
- default
-
successful operation
List of user object
application/xmlapplication/json
- default
-
successful operation
List of user object
application/xmlapplication/json
- default
-
successful operation
username |
The user name for login |
query | string | |
password |
The password for login in clear text |
query | string |
application/xmlapplication/json
- 200 OK
-
successful operation
X-Rate-Limit calls per hour allowed by the user
integer (int32) X-Expires-After date in UTC when token expires
string (date-time) - 400 Bad Request
-
Invalid username/password supplied
application/xmlapplication/json
- default
-
successful operation
This can only be done by the logged in user.
username |
The name that needs to be deleted |
path | string |
application/xmlapplication/json
- 400 Bad Request
-
Invalid username supplied
- 404 Not Found
-
User not found
username |
The name that needs to be fetched. Use user1 for testing. |
path | string |
application/xmlapplication/json
- 200 OK
-
successful operation
- 400 Bad Request
-
Invalid username supplied
- 404 Not Found
-
User not found
This can only be done by the logged in user.
Updated user object
username |
name that need to be updated |
path | string |
application/xmlapplication/json
- 400 Bad Request
-
Invalid user supplied
- 404 Not Found
-
User not found
Schema definitions
- id: integer (int64)
-
- petId: integer (int64)
-
- quantity: integer (int32)
-
- shipDate: string (date-time)
-
- status: string , x ∈ { placed , approved , delivered }
-
Order Status
- complete: boolean
-