Zum Inhalt springen
Auf dieser Seite

Find pet by ID.

Returns a single pet.

GET/pet/{petId}Find pet by ID.
curl 'https://petstore3.swagger.io/api/v3/pet/0' \
  -H 'api_key: <api_key>'
Beispielantwort · 200
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}

#Authentifizierung

Anfragen brauchen eines davon:

petstore_authwrite:petsread:pets

#Parameter

petIdinteger (int64)erforderlichpath

ID of pet to return

#Antworten

successful operation

application/json application/xml · Typ: Pet

idinteger (int64)
namestringerforderlich
categoryCategory
photoUrlsarray of stringerforderlich
tagsarray of Tag
statusstring

pet status in the store

Erlaubte Werte: "available", "pending", "sold"

{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}