Find pet by ID.
GET
/pet/{petId}
curl -X GET 'https://petstore3.swagger.io/api/v3/pet/0'package main
import ( "context" "net/http")
func main() { ctx := context.Background() req, err := http.NewRequestWithContext(ctx, "GET", "https://petstore3.swagger.io/api/v3/pet/0", nil) if err != nil { panic(err) } resp, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer resp.Body.Close()}import requests
response = requests.request("GET", "https://petstore3.swagger.io/api/v3/pet/0")print(response.json())const response = await fetch('https://petstore3.swagger.io/api/v3/pet/0', { method: 'GET' });const data = await response.json();Returns a single pet.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” petId
required
integer format: int64
ID of pet to return
Responses
Section titled “ Responses ”Successful operation
object
category
object
id
integer format: int64
name
string
id
integer format: int64
name
required
string
photoUrls
required
Array<string>
status
Pet status in the store
string
tags
Array<object>
object
id
integer format: int64
name
string
Example
{ "category": { "id": 1, "name": "Dogs" }, "id": 10, "name": "doggie", "status": "available"}object
category
object
id
integer format: int64
Example
1 name
string
Example
Dogs id
integer format: int64
Example
10 name
required
string
Example
doggie photoUrls
required
Array<string>
status
Pet status in the store
string
tags
Array<object>
object
id
integer format: int64
name
string
Invalid ID supplied
Pet not found
default
Section titled “default ”Unexpected error