Petstore API Reference

Version 1.0.0 — Generated API documentation for the Example Petstore.

Endpoints

GET/pets

Operation ID: listPets

Summary: List all pets

Parameters

NameLocationTypeRequired
limitqueryintegerNo

Response (200)

A paged array of pets.

{
  "type": "array",
  "items": {
    "id": "string",
    "name": "string",
    "tag": "string" (optional)
  }
}

POST/pets

Operation ID: createPet

Summary: Create a new pet

Request Body (required)

{
  "id": "string",
  "name": "string",
  "tag": "string" (optional)
}

Response (201)

The created pet object.

GET/pets/{petId}

Operation ID: getPetById

Summary: Get info for a specific pet

Parameters

NameLocationTypeRequired
petIdpathstringYes

Response (200)

{
  "id": "string",
  "name": "string",
  "tag": "string" (optional)
}

Pet Schema

FieldTypeRequired
idstringYes
namestringYes
tagstringNo

Sample Data

Sample pet records conforming to the schema are available as a published JSON document containing 6 pets: