Glenda
- ownerUserId
-
Jensen Bashirian @jensen_bashirian
- name
- Glenda
- species
- bird
- breedId
- —
- gender
- unknown
- birthDate
- 2013-01-16
- weightKg
- 1.27
- color
- Multi-color
- imageUrl
- https://picsum.photos/seed/pet-21/600/600
- createdAt
- updatedAt
Overview
pets / #21
Glenda
#21
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/21" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/21" ); 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/21"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/21"
)
pet = res.json() Response
{
"id": 21,
"ownerUserId": 29,
"name": "Glenda",
"species": "bird",
"breedId": null,
"gender": "unknown",
"birthDate": "2013-01-16",
"weightKg": 1.27,
"color": "Multi-color",
"imageUrl": "https://picsum.photos/seed/pet-21/600/600",
"createdAt": "2016-05-16T16:05:34.566Z",
"updatedAt": "2020-10-20T15:21:53.987Z"
}