Kevin
- ownerUserId
-
Jennifer Stoltenberg @jennifer_stoltenberg
- name
- Kevin
- species
- rabbit
- breedId
- —
- gender
- unknown
- birthDate
- 2016-07-11
- weightKg
- 5.5
- color
- Gray
- imageUrl
- https://picsum.photos/seed/pet-18/600/600
- createdAt
- updatedAt
Overview
pets / #18
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/18" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/18" ); 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/18"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/18"
)
pet = res.json() Response
{
"id": 18,
"ownerUserId": 25,
"name": "Kevin",
"species": "rabbit",
"breedId": null,
"gender": "unknown",
"birthDate": "2016-07-11",
"weightKg": 5.5,
"color": "Gray",
"imageUrl": "https://picsum.photos/seed/pet-18/600/600",
"createdAt": "2015-04-21T20:36:30.542Z",
"updatedAt": "2020-12-28T08:30:16.266Z"
}