Thank you for using the {bootprint-swagger} playground

Swagger Petstore

Base URL: /v2, Version: 1.0.5, Find out more about Swagger

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.

Schemes: https, http

Summary

Tag: pet

Everything about your Pets

Find out more

Operation Description
POST /pet/{petId}/uploadImage

uploads an image

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

Tag: store

Access to Petstore orders

Operation Description
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

GET /store/inventory

Returns pet inventories by status

Tag: user

Operations about user

Find out more about our store

Operation Description
POST /user/createWithArray

Creates list of users with given input array

POST /user/createWithList

Creates list of users with given input array

GET /user/{username}

Get user by user name

PUT /user/{username}

Updated user

DELETE /user/{username}

Delete user

GET /user/login

Logs user into the system

GET /user/logout

Logs out current logged in user session

POST /user

Create user

Security

api_key

Type: apiKey
Name:

api_key

In:

header

petstore_auth

Type: oauth2
Flow:

implicit

AuthorizationUrl:

https://petstore.swagger.io/oauth/authorize

Scopes:
read:pets: read your pets
write:pets: modify pets in your account

Paths

Add a new pet to the store

POST /pet

Tags: pet

application/json application/xml

Pet object that needs to be added to the store

Pet

application/json application/xml

405 Method Not Allowed

Invalid input

petstore_auth write:pets , read:pets
Update an existing pet

PUT /pet

Tags: pet

application/json application/xml

Pet object that needs to be added to the store

Pet

application/json application/xml

400 Bad Request

Invalid ID supplied

404 Not Found

Pet not found

405 Method Not Allowed

Validation exception

petstore_auth write:pets , read:pets
Finds Pets by status

GET /pet/findByStatus

Tags: pet

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/json application/xml

200 OK

successful operation

Pet
400 Bad Request

Invalid status value

petstore_auth write:pets , read:pets
Finds Pets by tags

GET /pet/findByTags

Tags: pet

Multiple 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/json application/xml

200 OK

successful operation

Pet
400 Bad Request

Invalid tag value

petstore_auth write:pets , read:pets
Deletes a pet

DELETE /pet/{petId}

Tags: pet
api_key header string
petId

Pet id to delete

path integer (int64)

application/json application/xml

400 Bad Request

Invalid ID supplied

404 Not Found

Pet not found

petstore_auth write:pets , read:pets
Find pet by ID

GET /pet/{petId}

Tags: pet

Returns a single pet

petId

ID of pet to return

path integer (int64)

application/json application/xml

200 OK

successful operation

Pet
400 Bad Request

Invalid ID supplied

404 Not Found

Pet not found

api_key
Updates a pet in the store with form data

POST /pet/{petId}

Tags: pet

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/json application/xml

405 Method Not Allowed

Invalid input

petstore_auth write:pets , read:pets
uploads an image

POST /pet/{petId}/uploadImage

Tags: pet

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 pet inventories by status

GET /store/inventory

Tags: store

Returns a map of status codes to quantities

application/json

200 OK

successful operation

integer (int32)
api_key
Place an order for a pet

POST /store/order

Tags: store

application/json

order placed for purchasing the pet

application/json application/xml

200 OK

successful operation

400 Bad Request

Invalid Order

Delete purchase order by ID

DELETE /store/order/{orderId}

Tags: store

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/json application/xml

400 Bad Request

Invalid ID supplied

404 Not Found

Order not found

Find purchase order by ID

GET /store/order/{orderId}

Tags: store

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/json application/xml

200 OK

successful operation

400 Bad Request

Invalid ID supplied

404 Not Found

Order not found

Create user

POST /user

Tags: user

This can only be done by the logged in user.

application/json

Created user object

application/json application/xml

default

successful operation

Creates list of users with given input array

POST /user/createWithArray

Tags: user

application/json

List of user object

application/json application/xml

default

successful operation

Creates list of users with given input array

POST /user/createWithList

Tags: user

application/json

List of user object

application/json application/xml

default

successful operation

Logs user into the system

GET /user/login

Tags: user
username

The user name for login

query string
password

The password for login in clear text

query string

application/json application/xml

200 OK

successful operation

X-Expires-After

date in UTC when token expires

string (date-time)
X-Rate-Limit

calls per hour allowed by the user

integer (int32)
400 Bad Request

Invalid username/password supplied

Logs out current logged in user session

GET /user/logout

Tags: user

application/json application/xml

default

successful operation

Delete user

DELETE /user/{username}

Tags: user

This can only be done by the logged in user.

username

The name that needs to be deleted

path string

application/json application/xml

400 Bad Request

Invalid username supplied

404 Not Found

User not found

Get user by user name

GET /user/{username}

Tags: user
username

The name that needs to be fetched. Use user1 for testing.

path string

application/json application/xml

200 OK

successful operation

400 Bad Request

Invalid username supplied

404 Not Found

User not found

Updated user

PUT /user/{username}

Tags: user

This can only be done by the logged in user.

application/json

Updated user object

username

name that need to be updated

path string

application/json application/xml

400 Bad Request

Invalid user supplied

404 Not Found

User not found

Schema definitions

ApiResponse: object

code: integer (int32)
type: string
message: string

Category: object

id: integer (int64)
name: string

Order: object

id: integer (int64)
petId: integer (int64)
quantity: integer (int32)
shipDate: string (date-time)
status: string , x ∈ { placed , approved , delivered }

Order Status

complete: boolean

Pet: object

id: integer (int64)
category: Category
name: string
"doggie"
photoUrls: string[]
string
tags: object[]
Tag
status: string , x ∈ { available , pending , sold }

pet status in the store

Tag: object

id: integer (int64)
name: string

User: object

id: integer (int64)
username: string
firstName: string
lastName: string
email: string
password: string
phone: string
userStatus: integer (int32)

User Status