Dion
- ownerUserId
-
Hershel Smitham @hershel.smitham
- name
- Dion
- species
- cat
- breedId
- Oriental Shorthair
- gender
- unknown
- birthDate
- 2016-02-01
- weightKg
- 4.6
- color
- Tabby
- imageUrl
- https://picsum.photos/seed/pet-136/600/600
- createdAt
- updatedAt
Overview
pets / #136
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/136" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/136" ); 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/136"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/136"
)
pet = res.json() Response
{
"id": 136,
"ownerUserId": 147,
"name": "Dion",
"species": "cat",
"breedId": 46,
"gender": "unknown",
"birthDate": "2016-02-01",
"weightKg": 4.6,
"color": "Tabby",
"imageUrl": "https://picsum.photos/seed/pet-136/600/600",
"createdAt": "2022-06-22T05:12:26.963Z",
"updatedAt": "2023-06-20T08:05:27.494Z"
}