example-data.com
Menu
Browse docs and collections

Overview

attachments / #497

Activity #497

User #247 attached image/webp (19090990 bytes)

10/15/2025, 6:39:29 AM

Component variants

Medium
Small

User #247 attached image/webp (19090990 bytes) · 10/15/2025, 6:39:29 AM

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/attachments/497"
);
const attachment = await res.json();

TypeScript example

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

const res = await fetch(
  "https://example-data.com/api/v1/attachments/497"
);
const attachment = (await res.json()) as Attachment;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/attachments/497"
)
attachment = res.json()

Response

{
  "id": 497,
  "userId": 247,
  "targetType": "restaurant",
  "targetId": 99,
  "url": "https://picsum.photos/seed/attachment-497/600/800",
  "mimeType": "image/webp",
  "sizeBytes": 19090990,
  "createdAt": "2025-10-15T06:39:29.794Z"
}