example-data.com
Menu
Browse docs and collections

Overview

attachments / #120

Activity #120

User #184 attached image/webp (35131955 bytes)

2/27/2026, 3:37:54 PM

Component variants

Medium
Small

User #184 attached image/webp (35131955 bytes) · 2/27/2026, 3:37:54 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 120,
  "userId": 184,
  "targetType": "restaurant",
  "targetId": 88,
  "url": "https://picsum.photos/seed/attachment-120/400/300",
  "mimeType": "image/webp",
  "sizeBytes": 35131955,
  "createdAt": "2026-02-27T15:37:54.218Z"
}