Hassan
- ownerUserId
-
Rickie Sporer @rickie.sporer50
- name
- Hassan
- species
- fish
- breedId
- Koi
- gender
- male
- birthDate
- 2017-12-04
- weightKg
- 0.16
- color
- Red
- imageUrl
- https://picsum.photos/seed/pet-140/600/600
- createdAt
- updatedAt
Overview
pets / #140
Hassan
#140
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/140" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/140" ); 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/140"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/140"
)
pet = res.json() Response
{
"id": 140,
"ownerUserId": 149,
"name": "Hassan",
"species": "fish",
"breedId": 68,
"gender": "male",
"birthDate": "2017-12-04",
"weightKg": 0.16,
"color": "Red",
"imageUrl": "https://picsum.photos/seed/pet-140/600/600",
"createdAt": "2021-06-12T07:41:04.803Z",
"updatedAt": "2022-07-18T17:15:50.022Z"
}