Skip to main content

Find pet by ID

GET 

https://petstore.swagger.io/v2/pet/:petId

Returns a single pet

Request

Path Parameters

    petId int64requireddeprecated

    ID of pet to return

Responses

successful operation

Schema

    id int64

    category

    Category

    id int64

    Category ID

    name string

    Possible values: non-empty

    Category name

    sub

    object

    Test Sub Category

    prop1 string

    Dumb Property

    name stringrequired

    The name given to a pet

    photoUrls url[]required

    Possible values: <= 20

    The list of URL to a cute photos featuring pet

    friend

    tags

    Tag[]

    Possible values: >= 1

    Tags attached to the pet

  • Array [

  • id int64
    name string

    Possible values: non-empty

    Tag name

  • ]

  • status string

    Possible values: [available, pending, sold]

    Pet status in the store

    petType

    string

    Possible values: [cat, dog, bee]

    Type of a pet

    huntingSkill stringrequired

    Possible values: [clueless, lazy, adventurous, aggressive]

    Default value: lazy

    The measured skill for hunting

curl -L 'https://petstore.swagger.io/v2/pet/:petId' \
-H 'Accept: application/json' \
-H 'api_key: <API_KEY_VALUE>'
Request Collapse all
Base URL
https://petstore.swagger.io/v2
Auth
Parameters
— pathrequired
ResponseClear

Click the Send API Request button above and see the response here!