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.
Introduction
This API is documented in OpenAPI format and is based on
Petstore sample provided by swagger.io team.
It was extended to illustrate features of generator-openapi-repo
tool and ReDoc documentation. In addition to standard
OpenAPI syntax we use a few vendor extensions.
OpenAPI Specification
This API is documented in OpenAPI format and is based on
Petstore sample provided by swagger.io team.
It was extended to illustrate features of generator-openapi-repo
tool and ReDoc documentation. In addition to standard
OpenAPI syntax we use a few vendor extensions.
Cross-Origin Resource Sharing
This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with W3C spec.
And that allows cross-domain communication from the browser.
All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
Authentication
Petstore offers two forms of authentication:
- API Key
- OAuth2
OAuth2 - an open protocol to allow secure authorization in a simple
and standard method from web, mobile and desktop applications.
Contact
Terms of Service
http://swagger.io/terms/License
Apache 2.0External Documentation
Find out how to create Github repo for your OpenAPI spec.Servers
Update an existing pet
Authorizations
Get access to data while protecting your account credentials.
OAuth2 is also a safer and more secure way to give you access.
implicit Flow
"http://petstore.swagger.io/api/oauth/dialog"
"write:pets"
modify pets in your account"read:pets"
read your pets
Request Body
My Pet
Pet ID
"int64"
Categories this pet belongs to
The name given to a pet
The list of URL to a cute photos featuring pet
1
10
Circular reference to /root
Tags attached to the pet
100
0
Pet status in the store
"available"
"pending"
"sold"
"pending"
Type of a pet
0
1
2
Responses
Invalid ID supplied
Add a new pet to the store
Add new pet to the store inventory.
Authorizations
Get access to data while protecting your account credentials.
OAuth2 is also a safer and more secure way to give you access.
implicit Flow
"http://petstore.swagger.io/api/oauth/dialog"
"write:pets"
modify pets in your account"read:pets"
read your pets
Request Body
My Pet
Pet ID
"int64"
Categories this pet belongs to
The name given to a pet
The list of URL to a cute photos featuring pet
1
10
Circular reference to /root
Tags attached to the pet
100
0
Pet status in the store
"available"
"pending"
"sold"
"pending"
Type of a pet
0
1
2
Responses
Invalid input
Find pet by ID
Returns a single pet
Authorizations
For this sample, you can use the api key special-key
to test the authorization filters.
Parameters
Path Parameters
ID of pet to return
"int64"
Responses
successful operation
Pet ID
"int64"
Categories this pet belongs to
The name given to a pet
The list of URL to a cute photos featuring pet
1
10
Circular reference to /root
Tags attached to the pet
100
0
Pet status in the store
"available"
"pending"
"sold"
"pending"
Type of a pet
0
1
2
Updates a pet in the store with form data
Authorizations
Get access to data while protecting your account credentials.
OAuth2 is also a safer and more secure way to give you access.
implicit Flow
"http://petstore.swagger.io/api/oauth/dialog"
"write:pets"
modify pets in your account"read:pets"
read your pets
Parameters
Path Parameters
ID of pet that needs to be updated
"int64"
Request Body
Updated name of the pet
Updated status of the pet
Responses
Invalid input
Deletes a pet
Authorizations
Get access to data while protecting your account credentials.
OAuth2 is also a safer and more secure way to give you access.
implicit Flow
"http://petstore.swagger.io/api/oauth/dialog"
"write:pets"
modify pets in your account"read:pets"
read your pets
Parameters
Header Parameters
"Bearer <TOKEN>"
Path Parameters
Pet id to delete
"int64"
Responses
Invalid pet value
uploads an image
Authorizations
Get access to data while protecting your account credentials.
OAuth2 is also a safer and more secure way to give you access.
implicit Flow
"http://petstore.swagger.io/api/oauth/dialog"
"write:pets"
modify pets in your account"read:pets"
read your pets
Parameters
Path Parameters
ID of pet to update
"int64"
Request Body
"binary"
Responses
successful operation
"int32"
Finds Pets by status
Multiple status values can be provided with comma separated strings
Authorizations
Get access to data while protecting your account credentials.
OAuth2 is also a safer and more secure way to give you access.
implicit Flow
"http://petstore.swagger.io/api/oauth/dialog"
"write:pets"
modify pets in your account"read:pets"
read your pets
Parameters
Query Parameters
Status values that need to be considered for filter
1
3
Responses
successful operation
Pet ID
"int64"
Categories this pet belongs to
The name given to a pet
The list of URL to a cute photos featuring pet
1
10
Circular reference to /root
Tags attached to the pet
100
0
Pet status in the store
"available"
"pending"
"sold"
"pending"
Type of a pet
0
1
2
Finds Pets by tags
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
Authorizations
Get access to data while protecting your account credentials.
OAuth2 is also a safer and more secure way to give you access.
implicit Flow
"http://petstore.swagger.io/api/oauth/dialog"
"write:pets"
modify pets in your account"read:pets"
read your pets
Parameters
Query Parameters
Tags to filter by
Responses
successful operation
Pet ID
"int64"
Categories this pet belongs to
The name given to a pet
The list of URL to a cute photos featuring pet
1
10
Circular reference to /root
Tags attached to the pet
100
0
Pet status in the store
"available"
"pending"
"sold"
"pending"
Type of a pet
0
1
2
Returns pet inventories by status
Place an order for a pet
Request Body
Order ID
"int64"
Pet ID
"int64"
"int32"
1
1
Estimated ship date
"date-time"
Order Status
"placed"
"approved"
"delivered"
Indicates whenever order was completed or not
false
Unique Request Id
Responses
successful operation
Order ID
"int64"
Pet ID
"int64"
"int32"
1
1
Estimated ship date
"date-time"
Order Status
"placed"
"approved"
"delivered"
Indicates whenever order was completed or not
false
Unique Request Id
Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
Parameters
Path Parameters
ID of pet that needs to be fetched
"int64"
1
5
Responses
successful operation
Order ID
"int64"
Pet ID
"int64"
"int32"
1
1
Estimated ship date
"date-time"
Order Status
"placed"
"approved"
"delivered"
Indicates whenever order was completed or not
false
Unique Request Id
Delete purchase order by ID
Subscribe to the Store events
Add subscription for a store events
Request Body
This URL will be called by the server when the desired event will occur
"uri"
Event name for the subscription
"orderInProgress"
"orderShipped"
"orderDelivered"
Responses
Successful operation
999
0
Create user
This can only be done by the logged in user.
Request Body
"int64"
User supplied username
4
User first name
1
User last name
1
User email address
"email"
User password, MUST contain a mix of upper and lower case letters, as well as digits
"password"
8
"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/"
User phone number in international format
"/^\\+(?:[0-9]-?){6,14}[0-9]$/"
User status
"int32"
User image
0
10
Responses
successful operation
Get user by user name
Parameters
Path Parameters
The name that needs to be fetched. Use user1 for testing.
Responses
successful operation
"int64"
User supplied username
4
User first name
1
User last name
1
User email address
"email"
User password, MUST contain a mix of upper and lower case letters, as well as digits
"password"
8
"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/"
User phone number in international format
"/^\\+(?:[0-9]-?){6,14}[0-9]$/"
User status
"int32"
User image
0
10
Updated user
This can only be done by the logged in user.
Parameters
Path Parameters
name that need to be updated
Request Body
"int64"
User supplied username
4
User first name
1
User last name
1
User email address
"email"
User password, MUST contain a mix of upper and lower case letters, as well as digits
"password"
8
"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/"
User phone number in international format
"/^\\+(?:[0-9]-?){6,14}[0-9]$/"
User status
"int32"
User image
0
10
Responses
User is updated successfully
"int64"
User supplied username
4
User first name
1
User last name
1
User email address
"email"
User password, MUST contain a mix of upper and lower case letters, as well as digits
"password"
8
"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/"
User phone number in international format
"/^\\+(?:[0-9]-?){6,14}[0-9]$/"
User status
"int32"
User image
0
10
Delete user
Creates list of users with given input array
Request Body
"int64"
User supplied username
4
User first name
1
User last name
1
User email address
"email"
User password, MUST contain a mix of upper and lower case letters, as well as digits
"password"
8
"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/"
User phone number in international format
"/^\\+(?:[0-9]-?){6,14}[0-9]$/"
User status
"int32"
User image
0
10
Responses
successful operation
Creates list of users with given input array
Request Body
"int64"
User supplied username
4
User first name
1
User last name
1
User email address
"email"
User password, MUST contain a mix of upper and lower case letters, as well as digits
"password"
8
"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/"
User phone number in international format
"/^\\+(?:[0-9]-?){6,14}[0-9]$/"
User status
"int32"
User image
0
10
Responses
successful operation