Sabtu, 08 Agustus 2015

index.html

API Reference

Swagger Petstore

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 for
Contact Info: apiteam@swagger.io
Version: 1.0.0
Apache 2.0
http://www.apache.org/licenses/LICENSE-2.0.html

Access

Customize this message as you see fit!

Methods

put: /pet
Pet
updatePet Update an existing pet

Parameters

body (optional)
Body Parameter — Pet object that needs to be added to the store

Return type


post: /pet
Pet
addPet Add a new pet to the store

Parameters

body (optional)
Body Parameter — Pet object that needs to be added to the store

Return type


get: /pet/findByStatus
Pet
findPetsByStatus Finds Pets by status
Multiple status values can be provided with comma seperated strings

Parameters

status (optional)
Query Parameter — Status values that need to be considered for filter default: available

Return type

Example data

Content-Type: application/json
[ {
  "photoUrls" : [ "aeiou" ],
  "name" : "doggie",
  "id" : 123456789,
  "category" : {
    "name" : "aeiou",
    "id" : 123456789
  },
  "tags" : [ {
    "name" : "aeiou",
    "id" : 123456789
  } ],
  "status" : "aeiou"
} ]

Example data

Content-Type: application/xml
<Pet>
  <id>123456</id>
  <name>doggie</name>
  <photoUrls>string</photoUrls>
  <status>string</status>
</Pet>

get: /pet/findByTags
Pet
findPetsByTags Finds Pets by tags
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.

Parameters

tags (optional)
Query Parameter — Tags to filter by

Return type

Example data

Content-Type: application/json
[ {
  "photoUrls" : [ "aeiou" ],
  "name" : "doggie",
  "id" : 123456789,
  "category" : {
    "name" : "aeiou",
    "id" : 123456789
  },
  "tags" : [ {
    "name" : "aeiou",
    "id" : 123456789
  } ],
  "status" : "aeiou"
} ]

Example data

Content-Type: application/xml
<Pet>
  <id>123456</id>
  <name>doggie</name>
  <photoUrls>string</photoUrls>
  <status>string</status>
</Pet>

get: /pet/{petId}
Pet
getPetById Find pet by ID
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions

Parameters

petId (required)
Path Parameter — ID of pet that needs to be fetched

Return type

Example data

Content-Type: application/json
{
  "photoUrls" : [ "aeiou" ],
  "name" : "doggie",
  "id" : 123456789,
  "category" : {
    "name" : "aeiou",
    "id" : 123456789
  },
  "tags" : [ {
    "name" : "aeiou",
    "id" : 123456789
  } ],
  "status" : "aeiou"
}

Example data

Content-Type: application/xml
<Pet>
  <id>123456</id>
  <name>doggie</name>
  <photoUrls>string</photoUrls>
  <status>string</status>
</Pet>

post: /pet/{petId}
Pet
updatePetWithForm Updates a pet in the store with form data

Parameters

petId (required)
Path Parameter — ID of pet that needs to be updated
name (optional)
Form Parameter — Updated name of the pet
status (optional)
Form Parameter — Updated status of the pet

Return type


delete: /pet/{petId}
Pet
deletePet Deletes a pet

Parameters

apiKey (optional)
Header Parameter
petId (required)
Path Parameter — Pet id to delete

Return type


post: /pet/{petId}/uploadImage
Pet
uploadFile uploads an image

Parameters

petId (required)
Path Parameter — ID of pet to update
additionalMetadata (optional)
Form Parameter — Additional data to pass to server
file (optional)
Form Parameter — file to upload

Return type


get: /store/inventory
Store
getInventory Returns pet inventories by status
Returns a map of status codes to quantities

Parameters

Return type

Example data

Content-Type: application/json
{
  "key" : 123
}

Example data

Content-Type: application/xml
not implemented io.swagger.models.properties.MapProperty@3e

post: /store/order
Store
placeOrder Place an order for a pet

Parameters

body (optional)
Body Parameter — order placed for purchasing the pet

Return type

Example data

Content-Type: application/json
{
  "petId" : 123456789,
  "quantity" : 123,
  "id" : 123456789,
  "shipDate" : "2015-06-09T07:23:55.625+0000",
  "complete" : true,
  "status" : "aeiou"
}

Example data

Content-Type: application/xml
<Order>
  <id>123456</id>
  <petId>123456</petId>
  <quantity>0</quantity>
  <shipDate>2015-06-09T00:23:55.631Z</shipDate>
  <status>string</status>
  <complete>true</complete>
</Order>

get: /store/order/{orderId}
Store
getOrderById Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions

Parameters

orderId (required)
Path Parameter — ID of pet that needs to be fetched

Return type

Example data

Content-Type: application/json
{
  "petId" : 123456789,
  "quantity" : 123,
  "id" : 123456789,
  "shipDate" : "2015-06-09T07:23:55.632+0000",
  "complete" : true,
  "status" : "aeiou"
}

Example data

Content-Type: application/xml
<Order>
  <id>123456</id>
  <petId>123456</petId>
  <quantity>0</quantity>
  <shipDate>2015-06-09T00:23:55.633Z</shipDate>
  <status>string</status>
  <complete>true</complete>
</Order>

delete: /store/order/{orderId}
Store
deleteOrder Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

Parameters

orderId (required)
Path Parameter — ID of the order that needs to be deleted

Return type


post: /user
User
createUser Create user
This can only be done by the logged in user.

Parameters

body (optional)
Body Parameter — Created user object

Return type


post: /user/createWithArray
User
createUsersWithArrayInput Creates list of users with given input array

Parameters

body (optional)
Body Parameter — List of user object

Return type


post: /user/createWithList
User
createUsersWithListInput Creates list of users with given input array

Parameters

body (optional)
Body Parameter — List of user object

Return type


get: /user/login
User
loginUser Logs user into the system

Parameters

username (optional)
Query Parameter — The user name for login
password (optional)
Query Parameter — The password for login in clear text

Return type

Example data

Content-Type: application/json
"aeiou"

Example data

Content-Type: application/xml
string

get: /user/logout
User
logoutUser Logs out current logged in user session

Parameters

Return type


get: /user/{username}
User
getUserByName Get user by user name

Parameters

username (required)
Path Parameter — The name that needs to be fetched. Use user1 for testing.

Return type

Example data

Content-Type: application/json
{
  "id" : 1,
  "username" : "johnp",
  "firstName" : "John",
  "lastName" : "Public",
  "email" : "johnp@swagger.io",
  "password" : "-secret-",
  "phone" : "0123456789",
  "userStatus" : 0
}

put: /user/{username}
User
updateUser Updated user
This can only be done by the logged in user.

Parameters

username (required)
Path Parameter — name that need to be deleted
body (optional)
Body Parameter — Updated user object

Return type


delete: /user/{username}
User
deleteUser Delete user
This can only be done by the logged in user.

Parameters

username (required)
Path Parameter — The name that needs to be deleted

Return type


Models

User

id
Long
username
String
firstName
String
lastName
String
email
String
password
String
phone
String
userStatus
Integer User Status

Category

id
Long
name
String

Pet

id
Long
category
Category
name
String
photoUrls
array[String]
tags
array[Tag]
status
String pet status in the store

Tag

id
Long
name
String

Order

id
Long
petId
Long
quantity
Integer
shipDate
Date
status
String Order Status
complete
Boolean

Tidak ada komentar:

Posting Komentar