Garth
- ownerUserId
-
Douglas Frami @douglas.frami
- name
- Garth
- species
- cat
- breedId
- Russian Blue
- gender
- male
- birthDate
- 2015-09-03
- weightKg
- 3.5
- color
- Tabby
- imageUrl
- https://picsum.photos/seed/pet-137/600/600
- createdAt
- updatedAt
Overview
pets / #137
Garth
#137
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/137" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/137" ); 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/137"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/137"
)
pet = res.json() Response
{
"id": 137,
"ownerUserId": 148,
"name": "Garth",
"species": "cat",
"breedId": 39,
"gender": "male",
"birthDate": "2015-09-03",
"weightKg": 3.5,
"color": "Tabby",
"imageUrl": "https://picsum.photos/seed/pet-137/600/600",
"createdAt": "2023-03-08T21:49:30.574Z",
"updatedAt": "2024-02-26T05:16:49.940Z"
}