example-data.com
Menu
Browse docs and collections

Overview

attachments / #794

Activity #794

User #207 attached image/webp (8560247 bytes)

3/28/2026, 3:25:18 AM

Component variants

Medium
Small

User #207 attached image/webp (8560247 bytes) · 3/28/2026, 3:25:18 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 794,
  "userId": 207,
  "targetType": "restaurant",
  "targetId": 84,
  "url": "https://picsum.photos/seed/attachment-794/400/300",
  "mimeType": "image/webp",
  "sizeBytes": 8560247,
  "createdAt": "2026-03-28T03:25:18.128Z"
}