Fredy
- ownerUserId
-
Lavonne Schmidt @lavonne.schmidt95
- name
- Fredy
- species
- fish
- breedId
- Goldfish
- gender
- female
- birthDate
- —
- weightKg
- 0.05
- color
- Black
- imageUrl
- https://picsum.photos/seed/pet-187/600/600
- createdAt
- updatedAt
Overview
pets / #187
Fredy
#187
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/187" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/187" ); 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/187"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/187"
)
pet = res.json() Response
{
"id": 187,
"ownerUserId": 192,
"name": "Fredy",
"species": "fish",
"breedId": 62,
"gender": "female",
"birthDate": null,
"weightKg": 0.05,
"color": "Black",
"imageUrl": "https://picsum.photos/seed/pet-187/600/600",
"createdAt": "2014-05-15T19:19:30.966Z",
"updatedAt": "2022-10-03T07:27:28.481Z"
}