example-data.com
Menu
Browse docs and collections

Overview

attachments / #276

Activity #276

User #199 attached image/png (12800072 bytes)

11/14/2025, 1:42:34 AM

Component variants

Medium
Small

User #199 attached image/png (12800072 bytes) · 11/14/2025, 1:42:34 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 276,
  "userId": 199,
  "targetType": "comment",
  "targetId": 437,
  "url": "https://picsum.photos/seed/attachment-276/400/300",
  "mimeType": "image/png",
  "sizeBytes": 12800072,
  "createdAt": "2025-11-14T01:42:34.999Z"
}