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.
Add a new pet to the store
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
body | body | Pet object that needs to be added to the store | Yes | { "id": "int64", "category": { "id": "int64", "name": "string" }, "name": "string", "photoUrls": [ "string" ], "tags": [ { "id": "int64", "name": "string" } ], "status": "string" /* pet status in the store */ } |
Code | Description | Schema |
---|---|---|
405 | Invalid input |
|
Update an existing pet
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
body | body | Pet object that needs to be added to the store | Yes | { "id": "int64", "category": { "id": "int64", "name": "string" }, "name": "string", "photoUrls": [ "string" ], "tags": [ { "id": "int64", "name": "string" } ], "status": "string" /* pet status in the store */ } |
Code | Description | Schema |
---|---|---|
400 | Invalid ID supplied |
|
404 | Pet not found |
|
405 | Validation exception |
|
Finds Pets by status
Multiple status values can be provided with comma separated strings
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
status | query | Status values that need to be considered for filter | Yes | ["available", "pending", "sold"] |
Code | Description | Schema |
---|---|---|
200 | successful operation | [ { "id": "int64", "category": { "id": "int64", "name": "string" }, "name": "string", "photoUrls": [ "string" ], "tags": [ { "id": "int64", "name": "string" } ], "status": "string" /* pet status in the store */ } ] |
400 | Invalid status value |
|
Finds Pets by tags
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
tags | query | Tags to filter by | Yes | ["string"] |
Code | Description | Schema |
---|---|---|
200 | successful operation | [ { "id": "int64", "category": { "id": "int64", "name": "string" }, "name": "string", "photoUrls": [ "string" ], "tags": [ { "id": "int64", "name": "string" } ], "status": "string" /* pet status in the store */ } ] |
400 | Invalid tag value |
|
Find pet by ID
Returns a single pet
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
petId | path | ID of pet to return | Yes | integer
|
Code | Description | Schema |
---|---|---|
200 | successful operation | { "id": "int64", "category": { "id": "int64", "name": "string" }, "name": "string", "photoUrls": [ "string" ], "tags": [ { "id": "int64", "name": "string" } ], "status": "string" /* pet status in the store */ } |
400 | Invalid ID supplied |
|
404 | Pet not found |
|
Updates a pet in the store with form data
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
petId | path | ID of pet that needs to be updated | Yes | integer
|
name | formData | Updated name of the pet | No | string
|
status | formData | Updated status of the pet | No | string
|
Code | Description | Schema |
---|---|---|
405 | Invalid input |
|
Deletes a pet
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
api_key | header | No | string
| |
petId | path | Pet id to delete | Yes | integer
|
Code | Description | Schema |
---|---|---|
400 | Invalid ID supplied |
|
404 | Pet not found |
|
uploads an image
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
petId | path | ID of pet to update | Yes | integer
|
additionalMetadata | formData | Additional data to pass to server | No | string
|
file | formData | file to upload | No | file
|
Code | Description | Schema |
---|---|---|
200 | successful operation | { "code": "int32", "type": "string", "message": "string" } |
Returns pet inventories by status
Returns a map of status codes to quantities
Code | Description | Schema |
---|---|---|
200 | successful operation | { "additionalProperties_1": "int32" } |
Place an order for a pet
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
body | body | order placed for purchasing the pet | Yes | { "id": "int64", "petId": "int64", "quantity": "int32", "shipDate": "string", "status": "string", /* Order Status */ "complete": "boolean" } |
Code | Description | Schema |
---|---|---|
200 | successful operation | { "id": "int64", "petId": "int64", "quantity": "int32", "shipDate": "string", "status": "string", /* Order Status */ "complete": "boolean" } |
400 | Invalid Order |
|
Find purchase order by ID
For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
orderId | path | ID of pet that needs to be fetched | Yes | integer
|
Code | Description | Schema |
---|---|---|
200 | successful operation | { "id": "int64", "petId": "int64", "quantity": "int32", "shipDate": "string", "status": "string", /* Order Status */ "complete": "boolean" } |
400 | Invalid ID supplied |
|
404 | Order not found |
|
Delete purchase order by ID
For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
orderId | path | ID of the order that needs to be deleted | Yes | integer
|
Code | Description | Schema |
---|---|---|
400 | Invalid ID supplied |
|
404 | Order not found |
|
Create user
This can only be done by the logged in user.
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
body | body | Created user object | Yes | { "id": "int64", "username": "string", "firstName": "string", "lastName": "string", "email": "string", "password": "string", "phone": "string", "userStatus": "int32" /* User Status */ } |
Code | Description | Schema |
---|---|---|
default | successful operation |
|
Creates list of users with given input array
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
body | body | List of user object | Yes | [ { "id": "int64", "username": "string", "firstName": "string", "lastName": "string", "email": "string", "password": "string", "phone": "string", "userStatus": "int32" /* User Status */ } ] |
Code | Description | Schema |
---|---|---|
default | successful operation |
|
Creates list of users with given input array
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
body | body | List of user object | Yes | [ { "id": "int64", "username": "string", "firstName": "string", "lastName": "string", "email": "string", "password": "string", "phone": "string", "userStatus": "int32" /* User Status */ } ] |
Code | Description | Schema |
---|---|---|
default | successful operation |
|
Logs user into the system
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
username | query | The user name for login | Yes | string
|
password | query | The password for login in clear text | Yes | string
|
Code | Description | Schema |
---|---|---|
200 | successful operation | "string"
|
400 | Invalid username/password supplied |
|
Logs out current logged in user session
Code | Description | Schema |
---|---|---|
default | successful operation |
|
Get user by user name
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
username | path | The name that needs to be fetched. Use user1 for testing. | Yes | string
|
Code | Description | Schema |
---|---|---|
200 | successful operation | { "id": "int64", "username": "string", "firstName": "string", "lastName": "string", "email": "string", "password": "string", "phone": "string", "userStatus": "int32" /* User Status */ } |
400 | Invalid username supplied |
|
404 | User not found |
|
Updated user
This can only be done by the logged in user.
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
username | path | name that need to be updated | Yes | string
|
body | body | Updated user object | Yes | { "id": "int64", "username": "string", "firstName": "string", "lastName": "string", "email": "string", "password": "string", "phone": "string", "userStatus": "int32" /* User Status */ } |
Code | Description | Schema |
---|---|---|
400 | Invalid user supplied |
|
404 | User not found |
|
Delete user
This can only be done by the logged in user.
Name | Located In | Description | Required | Schema |
---|---|---|---|---|
username | path | The name that needs to be deleted | Yes | string
|
Code | Description | Schema |
---|---|---|
400 | Invalid username supplied |
|
404 | User not found |
|