example-data.com
Menu
Browse docs and collections

Overview

attachments / #187

Activity #187

User #128 attached image/jpeg (42783005 bytes)

4/19/2026, 2:09:39 PM

Component variants

Medium
Small

User #128 attached image/jpeg (42783005 bytes) · 4/19/2026, 2:09:39 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 187,
  "userId": 128,
  "targetType": "comment",
  "targetId": 1068,
  "url": "https://picsum.photos/seed/attachment-187/800/800",
  "mimeType": "image/jpeg",
  "sizeBytes": 42783005,
  "createdAt": "2026-04-19T14:09:39.130Z"
}