Nicole
- ownerUserId
-
Daren Lockman @daren_lockman67
- name
- Nicole
- species
- cat
- breedId
- Persian
- gender
- unknown
- birthDate
- 2013-03-02
- weightKg
- 2.6
- color
- Tuxedo
- imageUrl
- https://picsum.photos/seed/pet-102/600/600
- createdAt
- updatedAt
Overview
pets / #102
Nicole
#102
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/102" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/102" ); 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/102"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/102"
)
pet = res.json() Response
{
"id": 102,
"ownerUserId": 116,
"name": "Nicole",
"species": "cat",
"breedId": 31,
"gender": "unknown",
"birthDate": "2013-03-02",
"weightKg": 2.6,
"color": "Tuxedo",
"imageUrl": "https://picsum.photos/seed/pet-102/600/600",
"createdAt": "2019-07-15T15:28:11.859Z",
"updatedAt": "2021-03-11T11:25:47.984Z"
}