example-data.com
Menu
Browse docs and collections

Overview

attachments / #15

Activity #15

User #237 attached image/jpeg (3838432 bytes)

3/26/2026, 7:15:11 AM

Component variants

Medium
Small

User #237 attached image/jpeg (3838432 bytes) · 3/26/2026, 7:15:11 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 15,
  "userId": 237,
  "targetType": "product",
  "targetId": 63,
  "url": "https://picsum.photos/seed/attachment-15/600/600",
  "mimeType": "image/jpeg",
  "sizeBytes": 3838432,
  "createdAt": "2026-03-26T07:15:11.207Z"
}