example-data.com
Menu
Browse docs and collections

Overview

attachments / #408

Activity #408

User #78 attached image/jpeg (46545037 bytes)

3/23/2026, 10:16:44 PM

Component variants

Medium
Small

User #78 attached image/jpeg (46545037 bytes) · 3/23/2026, 10:16:44 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 408,
  "userId": 78,
  "targetType": "product",
  "targetId": 149,
  "url": "https://picsum.photos/seed/attachment-408/600/400",
  "mimeType": "image/jpeg",
  "sizeBytes": 46545037,
  "createdAt": "2026-03-23T22:16:44.026Z"
}