example-data.com
Menu
Browse docs and collections

Overview

attachments / #734

Activity #734

User #8 attached image/png (13782453 bytes)

9/6/2025, 11:56:39 PM

Component variants

Medium
Small

User #8 attached image/png (13782453 bytes) · 9/6/2025, 11:56:39 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 734,
  "userId": 8,
  "targetType": "product",
  "targetId": 81,
  "url": "https://picsum.photos/seed/attachment-734/600/400",
  "mimeType": "image/png",
  "sizeBytes": 13782453,
  "createdAt": "2025-09-06T23:56:39.967Z"
}