example-data.com
Menu
Browse docs and collections

Overview

users / #51

Component variants

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/users/51" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/users/51"
);
const user = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/users.d.ts https://example-data.com/types/users.d.ts
import type { User } from "./types/users";

const res = await fetch(
  "https://example-data.com/api/v1/users/51"
);
const user = (await res.json()) as User;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/users/51"
)
user = res.json()

Response

{
  "id": 51,
  "firstName": "Hermina",
  "lastName": "West",
  "fullName": "Hermina West",
  "username": "hermina.west3",
  "email": "hermina.west3@example.com",
  "phone": "+1 202-555-0150 ext 1",
  "bio": "yak fan  🧛🏽‍♀️",
  "avatarUrl": "https://api.dicebear.com/9.x/avataaars/svg?seed=user-51",
  "thumbnailUrl": "https://api.dicebear.com/9.x/avataaars/svg?seed=user-51&size=128",
  "coverImageUrl": "https://picsum.photos/seed/user-cover-51/1200/400",
  "emailVerified": true,
  "isActive": true,
  "twitterHandle": "hermina.west3",
  "createdAt": "2024-07-19T00:18:54.032Z",
  "updatedAt": "2024-11-20T13:47:48.083Z"
}