example-data.com
Menu
Browse docs and collections

Overview

attachments / #203

Activity #203

User #208 attached image/jpeg (15475992 bytes)

3/6/2026, 10:45:46 AM

Component variants

Medium
Small

User #208 attached image/jpeg (15475992 bytes) · 3/6/2026, 10:45:46 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 203,
  "userId": 208,
  "targetType": "restaurant",
  "targetId": 30,
  "url": "https://picsum.photos/seed/attachment-203/800/800",
  "mimeType": "image/jpeg",
  "sizeBytes": 15475992,
  "createdAt": "2026-03-06T10:45:46.095Z"
}