example-data.com
Menu
Browse docs and collections

Overview

attachments / #19

Activity #19

User #65 attached image/png (11006147 bytes)

1/4/2026, 7:01:41 AM

Component variants

Medium
Small

User #65 attached image/png (11006147 bytes) · 1/4/2026, 7:01:41 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 19,
  "userId": 65,
  "targetType": "product",
  "targetId": 190,
  "url": "https://picsum.photos/seed/attachment-19/800/800",
  "mimeType": "image/png",
  "sizeBytes": 11006147,
  "createdAt": "2026-01-04T07:01:41.919Z"
}