Johnny
- ownerUserId
-
Karlee Hudson-Turner @karlee.hudson-turner88
- name
- Johnny
- species
- cat
- breedId
- Devon Rex
- gender
- male
- birthDate
- 2020-08-22
- weightKg
- 2.4
- color
- Tuxedo
- imageUrl
- https://picsum.photos/seed/pet-28/600/600
- createdAt
- updatedAt
Overview
pets / #28
Johnny
#28
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/28" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/28" ); const pet = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/pets.d.ts https://example-data.com/types/pets.d.ts
import type { Pet } from "./types/pets";
const res = await fetch(
"https://example-data.com/api/v1/pets/28"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/28"
)
pet = res.json() Response
{
"id": 28,
"ownerUserId": 36,
"name": "Johnny",
"species": "cat",
"breedId": 44,
"gender": "male",
"birthDate": "2020-08-22",
"weightKg": 2.4,
"color": "Tuxedo",
"imageUrl": "https://picsum.photos/seed/pet-28/600/600",
"createdAt": "2015-08-08T08:59:06.937Z",
"updatedAt": "2019-11-05T06:47:20.707Z"
}