example-data.com
Menu
Browse docs and collections

Overview

attachments / #478

Activity #478

User #152 attached image/png (33737361 bytes)

2/2/2026, 6:09:13 AM

Component variants

Medium
Small

User #152 attached image/png (33737361 bytes) · 2/2/2026, 6:09:13 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 478,
  "userId": 152,
  "targetType": "recipe",
  "targetId": 124,
  "url": "https://picsum.photos/seed/attachment-478/600/600",
  "mimeType": "image/png",
  "sizeBytes": 33737361,
  "createdAt": "2026-02-02T06:09:13.595Z"
}