example-data.com
Menu
Browse docs and collections

Overview

attachments / #489

Activity #489

User #92 attached image/webp (28647631 bytes)

10/8/2025, 5:13:55 PM

Component variants

Medium
Small

User #92 attached image/webp (28647631 bytes) · 10/8/2025, 5:13:55 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 489,
  "userId": 92,
  "targetType": "comment",
  "targetId": 19,
  "url": "https://picsum.photos/seed/attachment-489/600/800",
  "mimeType": "image/webp",
  "sizeBytes": 28647631,
  "createdAt": "2025-10-08T17:13:55.318Z"
}