example-data.com
Menu
Browse docs and collections

Overview

attachments / #689

Activity #689

User #170 attached image/png (30290269 bytes)

10/28/2025, 7:53:39 PM

Component variants

Medium
Small

User #170 attached image/png (30290269 bytes) · 10/28/2025, 7:53:39 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 689,
  "userId": 170,
  "targetType": "comment",
  "targetId": 1477,
  "url": "https://picsum.photos/seed/attachment-689/1200/300",
  "mimeType": "image/png",
  "sizeBytes": 30290269,
  "createdAt": "2025-10-28T19:53:39.780Z"
}