example-data.com
Menu
Browse docs and collections

Overview

attachments / #356

Activity #356

User #160 attached image/webp (36942258 bytes)

3/5/2026, 10:07:03 AM

Component variants

Medium
Small

User #160 attached image/webp (36942258 bytes) · 3/5/2026, 10:07:03 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 356,
  "userId": 160,
  "targetType": "product",
  "targetId": 167,
  "url": "https://picsum.photos/seed/attachment-356/800/300",
  "mimeType": "image/webp",
  "sizeBytes": 36942258,
  "createdAt": "2026-03-05T10:07:03.766Z"
}