Travis
- ownerUserId
-
Chyna Kozey @chyna_kozey80
- name
- Travis
- species
- fish
- breedId
- Betta
- gender
- male
- birthDate
- 2013-10-11
- weightKg
- 0.41
- color
- Silver
- imageUrl
- https://picsum.photos/seed/pet-132/600/600
- createdAt
- updatedAt
Overview
pets / #132
Travis
#132
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/132" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/132" ); 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/132"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/132"
)
pet = res.json() Response
{
"id": 132,
"ownerUserId": 140,
"name": "Travis",
"species": "fish",
"breedId": 63,
"gender": "male",
"birthDate": "2013-10-11",
"weightKg": 0.41,
"color": "Silver",
"imageUrl": "https://picsum.photos/seed/pet-132/600/600",
"createdAt": "2017-12-15T02:01:56.358Z",
"updatedAt": "2019-03-23T17:51:44.481Z"
}