Cooper
- ownerUserId
-
Casimir Smitham @casimir_smitham35
- name
- Cooper
- species
- dog
- breedId
- Beagle
- gender
- male
- birthDate
- 2015-05-26
- weightKg
- 31.6
- color
- Brown
- imageUrl
- https://picsum.photos/seed/pet-15/600/600
- createdAt
- updatedAt
Overview
pets / #15
Cooper
#15
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/15" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/15" ); 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/15"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/15"
)
pet = res.json() Response
{
"id": 15,
"ownerUserId": 16,
"name": "Cooper",
"species": "dog",
"breedId": 6,
"gender": "male",
"birthDate": "2015-05-26",
"weightKg": 31.6,
"color": "Brown",
"imageUrl": "https://picsum.photos/seed/pet-15/600/600",
"createdAt": "2012-09-15T12:30:16.558Z",
"updatedAt": "2022-05-20T22:16:05.698Z"
}