Christy
- ownerUserId
-
Cayla Farrell @cayla_farrell
- name
- Christy
- species
- dog
- breedId
- —
- gender
- unknown
- birthDate
- 2013-09-22
- weightKg
- 66.4
- color
- Golden
- imageUrl
- https://picsum.photos/seed/pet-5/600/600
- createdAt
- updatedAt
Overview
pets / #5
Christy
#5
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/5" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/5" ); 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/5"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/5"
)
pet = res.json() Response
{
"id": 5,
"ownerUserId": 4,
"name": "Christy",
"species": "dog",
"breedId": null,
"gender": "unknown",
"birthDate": "2013-09-22",
"weightKg": 66.4,
"color": "Golden",
"imageUrl": "https://picsum.photos/seed/pet-5/600/600",
"createdAt": "2014-01-11T05:26:16.554Z",
"updatedAt": "2017-04-11T23:21:04.112Z"
}