example-data.com
Menu
Browse docs and collections

Overview

attachments / #232

Activity #232

User #117 attached image/png (3732508 bytes)

6/13/2025, 2:03:52 AM

Component variants

Medium
Small

User #117 attached image/png (3732508 bytes) · 6/13/2025, 2:03:52 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 232,
  "userId": 117,
  "targetType": "product",
  "targetId": 189,
  "url": "https://picsum.photos/seed/attachment-232/600/800",
  "mimeType": "image/png",
  "sizeBytes": 3732508,
  "createdAt": "2025-06-13T02:03:52.331Z"
}