example-data.com
Menu
Browse docs and collections

Overview

attachments / #604

Activity #604

User #12 attached application/pdf (5947114 bytes)

12/21/2025, 4:07:26 PM

Component variants

Medium
Small

User #12 attached application/pdf (5947114 bytes) · 12/21/2025, 4:07:26 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 604,
  "userId": 12,
  "targetType": "comment",
  "targetId": 1110,
  "url": "https://example.com/files/attachment-604.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 5947114,
  "createdAt": "2025-12-21T16:07:26.213Z"
}