Gunnar
- ownerUserId
-
Sammy Schmidt @sammy.schmidt
- name
- Gunnar
- species
- cat
- breedId
- American Shorthair
- gender
- female
- birthDate
- —
- weightKg
- 4.4
- color
- Calico
- imageUrl
- https://picsum.photos/seed/pet-181/600/600
- createdAt
- updatedAt
Overview
pets / #181
Gunnar
#181
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/181" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/181" ); 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/181"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/181"
)
pet = res.json() Response
{
"id": 181,
"ownerUserId": 186,
"name": "Gunnar",
"species": "cat",
"breedId": 41,
"gender": "female",
"birthDate": null,
"weightKg": 4.4,
"color": "Calico",
"imageUrl": "https://picsum.photos/seed/pet-181/600/600",
"createdAt": "2020-01-23T18:04:54.259Z",
"updatedAt": "2023-03-03T17:25:43.356Z"
}