REST API

REST API

pet

Everything about your Pets

NameDescription
body *
(body)
Pet object that needs to be added to the store
{
  "id": 0,
  "category": {
    "id": 0,
    "name": "string"
  },
  "name": "doggie",
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}

Responses

CodeDescription
405
Invalid input

NameDescription
body *
(body)
Pet object that needs to be added to the store
{
  "id": 0,
  "category": {
    "id": 0,
    "name": "string"
  },
  "name": "doggie",
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}

Responses

CodeDescription
400
Invalid ID supplied
404
Pet not found
405
Validation exception

parameters

NameDescription
status *
array[string]
(query)
Status values that need to be considered for filter

Available values : available, pending, sold

Responses

CodeDescription
200
successful operation
[
  {
    "id": 0,
    "category": {
      "id": 0,
      "name": "string"
    },
    "name": "doggie",
    "photoUrls": [
      "string"
    ],
    "tags": [
      {
        "id": 0,
        "name": "string"
      }
    ],
    "status": "available"
  }
]
400
Invalid status value

 

Returns a single pet

Parameters

NameDescription
petId *
integer($int64)
(path)
ID of pet to return

Responses

CodeDescription
200
successful operation
{
  "id": 0,
  "category": {
    "id": 0,
    "name": "string"
  },
  "name": "doggie",
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}
400
Invalid ID supplied
404
Pet not found

Parameters

NameDescription
petId *
integer($int64)
(path)
ID of pet that needs to be updated
name
string
(formData)
Updated name of the pet
status
string
(formData)
Updated status of the pet

Responses

CodeDescription
405
Invalid input

Parameters

NameDescription
api_key
string
(header)
petId *
integer($int64)
(path)
Pet id to delete

Responses

CodeDescription
400
Invalid ID supplied
404
Pet not found

Parameters

NameDescription
petId *
integer($int64)
(path)
ID of pet to update
additionalMetadata
string
(formData)
Additional data to pass to server
file
file
(formData)
file to upload

Responses

CodeDescription
200
successful operation
{
  "code": 0,
  "type": "string",
  "message": "string"
}

 

store Access to Petstore orders

Returns a map of status codes to quantities

Parameters

No parameters

Responses

CodeDescription
200
successful operation
{
  "additionalProp1": 0,
  "additionalProp2": 0,
  "additionalProp3": 0
}

Parameters

NameDescription
body *
(body)
order placed for purchasing the pet
{
  "id": 0,
  "petId": 0,
  "quantity": 0,
  "shipDate": "2019-03-03T20:43:58.190Z",
  "status": "placed",
  "complete": false
}

Responses

CodeDescription
200
successful operation
{
  "id": 0,
  "petId": 0,
  "quantity": 0,
  "shipDate": "2019-03-03T20:44:42.078Z",
  "status": "placed",
  "complete": false
}
400
Invalid Order

 

Parameters

NameDescription
orderId *
integer($int64)
(path)
ID of pet that needs to be fetched

Responses

CodeDescription
200
successful operation
{
  "id": 0,
  "petId": 0,
  "quantity": 0,
  "shipDate": "2019-03-03T20:46:55.322Z",
  "status": "placed",
  "complete": false
}
400
Invalid ID supplied
404
Order not found

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

Parameters

NameDescription
orderId *
integer($int64)
(path)
ID of the order that needs to be deleted

Responses

CodeDescription
400
Invalid ID supplied
404
Order not found

user Operations about user

This can only be done by the logged in user.

Parameters

NameDescription
body *
(body)
Created user object
{
  "id": 0,
  "username": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "password": "string",
  "phone": "string",
  "userStatus": 0
}

Responses

CodeDescription
default
successful operation

Parameters

NameDescription
body *
(body)
List of user object
[
  {
    "id": 0,
    "username": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "password": "string",
    "phone": "string",
    "userStatus": 0
  }
]

Responses

CodeDescription
default
successful operation

Parameters

NameDescription
body *
(body)
List of user object
[
  {
    "id": 0,
    "username": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "password": "string",
    "phone": "string",
    "userStatus": 0
  }
]

Responses

CodeDescription
default
successful operation

Parameters

NameDescription
username *
string
(query)
The user name for login
password *
string
(query)
The password for login in clear text

Responses

CodeDescription
200
successful operation

Headers:

NameDescriptionType
X-Rate-Limit
calls per hour allowed by the user
integer
X-Expires-After
date in UTC when token expires
string
400

Invalid username/password supplied

Parameters

No parameters

Responses

CodeDescription
default
successful operation

NameDescription
username *
string
(path)
The name that needs to be fetched. Use user1 for testing.

Responses

CodeDescription
200
successful operation
{
  "id": 0,
  "username": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "password": "string",
  "phone": "string",
  "userStatus": 0
}
400
Invalid username supplied
404
User not found

This can only be done by the logged in user.

Parameters

NameDescription
username *
string
(path)
name that need to be updated
body *
(body)
Updated user object
{
  "id": 0,
  "username": "string",
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "password": "string",
  "phone": "string",
  "userStatus": 0
}

Responses

CodeDescription
400
Invalid user supplied
404
User not found

This can only be done by the logged in user.

Parameters

NameDescription
username *
string
(path)
The name that needs to be deleted

Responses

CodeDescription
400
Invalid username supplied
404
User not found