example-data.com
Menu
Browse docs and collections

Overview

attachments / #448

Activity #448

User #5 attached image/webp (30062974 bytes)

2/8/2026, 2:22:44 AM

Component variants

Medium
Small

User #5 attached image/webp (30062974 bytes) · 2/8/2026, 2:22:44 AM

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/attachments/448"
);
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/448"
);
const attachment = (await res.json()) as Attachment;

Python example

import requests

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

Response

{
  "id": 448,
  "userId": 5,
  "targetType": "restaurant",
  "targetId": 16,
  "url": "https://picsum.photos/seed/attachment-448/600/300",
  "mimeType": "image/webp",
  "sizeBytes": 30062974,
  "createdAt": "2026-02-08T02:22:44.530Z"
}