Skip to content
PrathyushaYelleni edited this page Jul 8, 2013 · 2 revisions

#API Document

Api Version: 0.2

Resources

1. /usha

Overview

information about usha

1.1.1 createUsersWithArrayInput

POST /user.{format}/createWithArray

Creates list of users with given input array

URL
http://petstore.swagger.wordnik.com/api/user.{format}/createWithArray
Parameters
  • body

    Parameter Required Description Data Type
    Array[User] true List of user object Array[User]
Errors
Status Code Reason

1.2.1 createUser

POST /user.{format}

Create user This can only be done by the logged in user.

URL
http://petstore.swagger.wordnik.com/api/user.{format}
Parameters
  • body

    Parameter Required Description Data Type
    User true Created user object User
Errors
Status Code Reason

1.3.1 createUsersWithListInput

POST /user.{format}/createWithList

Creates list of users with given list input

URL
http://petstore.swagger.wordnik.com/api/user.{format}/createWithList
Parameters
  • body

    Parameter Required Description Data Type
    List[User] true List of user object List[User]
Errors
Status Code Reason

1.4.1 updateUser

PUT /user.{format}/{username}

Updated user This can only be done by the logged in user.

URL
http://petstore.swagger.wordnik.com/api/user.{format}/{username}
Parameters
  • body

    Parameter Required Description Data Type
    User true Updated user object User
  • path

    Parameter Required Description Data Type
    username true name that need to be deleted string
Errors
Status Code Reason
400 Invalid username supplied
404 User not found

1.4.2 deleteUser

DELETE /user.{format}/{username}

Delete user This can only be done by the logged in user.

URL
http://petstore.swagger.wordnik.com/api/user.{format}/{username}
Parameters
  • path

    Parameter Required Description Data Type
    username true The name that needs to be deleted string
Errors
Status Code Reason
400 Invalid username supplied
404 User not found

1.4.3 getUserByName

GET /user.{format}/{username}

Get user by user name

URL
http://petstore.swagger.wordnik.com/api/user.{format}/{username}
Parameters
  • path

    Parameter Required Description Data Type
    username true The name that needs to be fetched. Use user1 for testing. string
Response

User

Errors
Status Code Reason
400 Invalid username supplied
404 User not found

1.5.1 loginUser

GET /user.{format}/login

Logs user into the system

URL
http://petstore.swagger.wordnik.com/api/user.{format}/login
Parameters
  • query

    Parameter Required Description Data Type
    username true The user name for login string
    password true The password for login in clear text string
Errors
Status Code Reason
400 Invalid username and password combination

1.6.1 logoutUser

GET /user.{format}/logout

Logs out current logged in user session

URL
http://petstore.swagger.wordnik.com/api/user.{format}/logout
Parameters
Errors
Status Code Reason

2. /pet

Overview

Operations about pets

2.1.1 getPetById

GET /pet.{format}/{petId}

Find pet by ID Returns a pet based on ID

URL
http://petstore.swagger.wordnik.com/api/pet.{format}/{petId}
Parameters
  • path

    Parameter Required Description Data Type
    petId true ID of pet that needs to be fetched string
Response

Pet

Errors
Status Code Reason
400 Invalid ID supplied
404 Pet not found

2.2.1 addPet

POST /pet.{format}

Add a new pet to the store

URL
http://petstore.swagger.wordnik.com/api/pet.{format}
Parameters
  • body

    Parameter Required Description Data Type
    Pet true Pet object that needs to be added to the store Pet
Errors
Status Code Reason
405 Invalid input

2.2.2 updatePet

PUT /pet.{format}

Update an existing pet

URL
http://petstore.swagger.wordnik.com/api/pet.{format}
Parameters
  • body

    Parameter Required Description Data Type
    Pet true Pet object that needs to be updated in the store Pet
Errors
Status Code Reason
400 Invalid ID supplied
404 Pet not found
405 Validation exception

2.3.1 findPetsByStatus

GET /pet.{format}/findByStatus

Finds Pets by status Multiple status values can be provided with comma seperated strings

URL
http://petstore.swagger.wordnik.com/api/pet.{format}/findByStatus
Parameters
  • query

    Parameter Required Description Data Type
    status true Status values that need to be considered for filter string
Response

List[Pet]

Errors
Status Code Reason
400 Invalid status value

2.4.1 findPetsByTags

GET /pet.{format}/findByTags

Finds Pets by tags Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.

URL
http://petstore.swagger.wordnik.com/api/pet.{format}/findByTags
Parameters
  • query

    Parameter Required Description Data Type
    tags true Tags to filter by string
Response

List[Pet]

Errors
Status Code Reason
400 Invalid tag value

3. /store

Overview

Operations about store

3.1.1 getOrderById

GET /store.{format}/order/{orderId}

Find purchase order by ID For valid response try integer IDs with value <= 5. Anything above 5 or nonintegers will generate API errors

URL
http://petstore.swagger.wordnik.com/api/store.{format}/order/{orderId}
Parameters
  • path

    Parameter Required Description Data Type
    orderId true ID of pet that needs to be fetched string
Response

Order

Errors
Status Code Reason
400 Invalid ID supplied
404 Order not found

3.1.2 deleteOrder

DELETE /store.{format}/order/{orderId}

Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

URL
http://petstore.swagger.wordnik.com/api/store.{format}/order/{orderId}
Parameters
  • path

    Parameter Required Description Data Type
    orderId true ID of the order that needs to be deleted string
Errors
Status Code Reason
400 Invalid ID supplied
404 Order not found

3.2.1 placeOrder

POST /store.{format}/order

Place an order for a pet

URL
http://petstore.swagger.wordnik.com/api/store.{format}/order
Parameters
  • body

    Parameter Required Description Data Type
    Order true order placed for purchasing the pet Order
Errors
Status Code Reason
400 Invalid order

Data Types

type required access description notes
id long optional - -
lastName string optional - -
phone string optional - -
username string optional - -
email string optional - -
userStatus int optional User Status -
firstName string optional - -
password string optional - -
type required access description notes
id long optional - -
name string optional - -
type required access description notes
tags Array:Tag optional - -
id long optional - -
category Category optional - -
status string optional pet status in the store -
name string optional - -
photoUrls Array:string optional - -
type required access description notes
id long optional - -
name string optional - -
type required access description notes
id long optional - -
petId long optional - -
status string optional Order Status -
quantity int optional - -
shipDate Date optional - -