Petstore

Getting started guide

Getting started guidew

Method 1

asdsa das d sadsa das dasdd asd sad as d

salkjdfsal;kdjksa'dlsa'
dsalkndlksandlksa 
sad
 sa
 d

sad asd asd asd sa d sa d asd asd asd asd

Example 1
My example 1
Operations
pet

Everything about your Pets

GET /pet/findByStatus
GET /pet/findByTags
GET /pet/{petId}
DELETE /pet/{petId}
POST /pet/{petId}/uploadImage
Add a new pet to the store
POST /pet

Authentication

petstore_auth
write:pets
read:pets

Request body

application/json
application/xml

Pet object that needs to be added to the store

Responses

405 405

Invalid input

application/xml
application/json
Update an existing pet
PUT /pet

Authentication

petstore_auth
write:pets
read:pets

Request body

application/json
application/xml

Pet object that needs to be added to the store

Responses

400 400

Invalid ID supplied

application/xml
application/json
404 404

Pet not found

application/xml
application/json
405 405

Validation exception

application/xml
application/json
Finds Pets by status
GET /pet/findByStatus

Authentication

petstore_auth
write:pets
read:pets

Multiple status values can be provided with comma separated strings

Request parameters

status
string required

Status values that need to be considered for filter

Collection format: multi
Enumeration:
available
pending
sold

Responses

200 200

successful operation

Body
application/xml
application/json
Array of Pet
400 400

Invalid status value

application/xml
application/json
Finds Pets by tags
GET /pet/findByTags

Authentication

petstore_auth
write:pets
read:pets

Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

Request parameters

tags
string required

Tags to filter by

Collection format: multi

Responses

200 200

successful operation

Body
application/xml
application/json
Array of Pet
400 400

Invalid tag value

application/xml
application/json
Find pet by ID
GET /pet/{petId}

Authentication

api_key

Returns a single pet

Path variables

petId
integer int64 required

ID of pet to return

Responses

200 200

successful operation

Body
application/xml
application/json
400 400

Invalid ID supplied

application/xml
application/json
404 404

Pet not found

application/xml
application/json
Updates a pet in the store with form data
POST /pet/{petId}

Authentication

petstore_auth
write:pets
read:pets

Path variables

petId
integer int64 required

ID of pet that needs to be updated

Request body

application/x-www-form-urlencoded
Object
name
string

Updated name of the pet

status
string

Updated status of the pet

Responses

405 405

Invalid input

application/xml
application/json
Deletes a pet
DELETE /pet/{petId}

Authentication

petstore_auth
write:pets
read:pets

Path variables

petId
integer int64 required

Pet id to delete

Request headers

api_key
string optional

Responses

400 400

Invalid ID supplied

application/xml
application/json
404 404

Pet not found

application/xml
application/json
uploads an image
POST /pet/{petId}/uploadImage

Authentication

petstore_auth
write:pets
read:pets

Path variables

petId
integer int64 required

ID of pet to update

Request body

multipart/form-data
Object
additionalMetadata
string

Additional data to pass to server

file
string binary

file to upload

Responses

200 200

successful operation

Body
application/json
store

Access to Petstore orders

GET /store/inventory
POST /store/order
GET /store/order/{orderId}
DELETE /store/order/{orderId}
Returns pet inventories by status
GET /store/inventory

Authentication

api_key

Returns a map of status codes to quantities

Responses

200 200

successful operation

Body
application/json
Object
Place an order for a pet
POST /store/order

Authentication

api_key

Request body

order placed for purchasing the pet

Responses

200 200

successful operation

Body
application/xml
application/json
400 400

Invalid Order

application/xml
application/json
Find purchase order by ID
GET /store/order/{orderId}

Authentication

api_key

For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions

Path variables

orderId
integer int64 required

ID of pet that needs to be fetched

Min: 1
Max: 10

Responses

200 200

successful operation

Body
application/xml
application/json
400 400

Invalid ID supplied

application/xml
application/json
404 404

Order not found

application/xml
application/json
Delete purchase order by ID
DELETE /store/order/{orderId}

Authentication

api_key

For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors

Path variables

orderId
integer int64 required

ID of the order that needs to be deleted

Min: 1

Responses

400 400

Invalid ID supplied

application/xml
application/json
404 404

Order not found

application/xml
application/json
user

Operations about user

POST /user
GET /user/login
GET /user/{username}
PUT /user/{username}
DELETE /user/{username}
Create user
POST /user

Authentication

api_key

This can only be done by the logged in user.

Request body

Created user object

Responses

500 default

successful operation

application/xml
application/json
Creates list of users with given input array
POST /user/createWithArray

Authentication

api_key

Request body

List of user object

Array of User

Responses

500 default

successful operation

application/xml
application/json
Creates list of users with given input array
POST /user/createWithList

Authentication

api_key

Request body

List of user object

Array of User

Responses

500 default

successful operation

application/xml
application/json
Logs user into the system
GET /user/login

Authentication

api_key

Request parameters

username
string required

The user name for login

password
string required

The password for login in clear text

Responses

200 200

successful operation

Headers
X-Rate-Limit
integer int32 optional

calls per hour allowed by the user

X-Expires-After
string date-time optional

date in UTC when token expires

Body
application/xml
application/json
string
400 400

Invalid username/password supplied

application/xml
application/json
Logs out current logged in user session
GET /user/logout

Authentication

api_key

Responses

500 default

successful operation

application/xml
application/json
Get user by user name
GET /user/{username}

Authentication

api_key

Path variables

username
string required

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

Responses

200 200

successful operation

Body
application/xml
application/json
400 400

Invalid username supplied

application/xml
application/json
404 404

User not found

application/xml
application/json
Updated user
PUT /user/{username}

Authentication

api_key

This can only be done by the logged in user.

Path variables

username
string required

name that need to be updated

Request body

Updated user object

Responses

400 400

Invalid user supplied

application/xml
application/json
404 404

User not found

application/xml
application/json
Delete user
DELETE /user/{username}

Authentication

api_key

This can only be done by the logged in user.

Path variables

username
string required

The name that needs to be deleted

Responses

400 400

Invalid username supplied

application/xml
application/json
404 404

User not found

application/xml
application/json
Type Definitions
Order
Object
id
integer int64
petId
integer int64
quantity
integer int32
shipDate
string date-time
status
string

Order Status

Enumeration:
placed
approved
delivered
complete
boolean
Category
Object
id
integer int64
name
string
Types: Pet
User
Object
id
integer int64
username
string
firstName
string
lastName
string
email
string
password
string
phone
string
userStatus
integer int32

User Status

Tag
Object
id
integer int64
name
string
Types: Pet
Pet
Object
id
integer int64
category
name
string
Example:
doggie
photoUrls
Array of string
tags
Array of Tag
status
string

pet status in the store

Enumeration:
available
pending
sold
ApiResponse
Object
code
integer int32
type
string
message
string