example-data.com
Menu
Browse docs and collections

Overview

attachments / #377

Activity #377

User #29 attached image/jpeg (16020488 bytes)

4/27/2026, 10:33:41 AM

Component variants

Medium
Small

User #29 attached image/jpeg (16020488 bytes) · 4/27/2026, 10:33:41 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 377,
  "userId": 29,
  "targetType": "product",
  "targetId": 174,
  "url": "https://picsum.photos/seed/attachment-377/400/300",
  "mimeType": "image/jpeg",
  "sizeBytes": 16020488,
  "createdAt": "2026-04-27T10:33:41.536Z"
}