example-data.com
Menu
Browse docs and collections

Overview

attachments / #249

Activity #249

User #150 attached image/png (5966441 bytes)

9/30/2025, 2:43:37 PM

Component variants

Medium
Small

User #150 attached image/png (5966441 bytes) · 9/30/2025, 2:43:37 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 249,
  "userId": 150,
  "targetType": "restaurant",
  "targetId": 47,
  "url": "https://picsum.photos/seed/attachment-249/400/600",
  "mimeType": "image/png",
  "sizeBytes": 5966441,
  "createdAt": "2025-09-30T14:43:37.395Z"
}