example-data.com
Menu
Browse docs and collections

Overview

attachments / #554

Activity #554

User #171 attached image/webp (31525899 bytes)

5/3/2026, 8:27:27 PM

Component variants

Medium
Small

User #171 attached image/webp (31525899 bytes) · 5/3/2026, 8:27:27 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 554,
  "userId": 171,
  "targetType": "comment",
  "targetId": 154,
  "url": "https://picsum.photos/seed/attachment-554/1200/300",
  "mimeType": "image/webp",
  "sizeBytes": 31525899,
  "createdAt": "2026-05-03T20:27:27.361Z"
}