example-data.com
Menu
Browse docs and collections

Overview

attachments / #479

Activity #479

User #42 attached image/png (13699798 bytes)

8/20/2025, 4:55:01 AM

Component variants

Medium
Small

User #42 attached image/png (13699798 bytes) · 8/20/2025, 4:55:01 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 479,
  "userId": 42,
  "targetType": "comment",
  "targetId": 383,
  "url": "https://picsum.photos/seed/attachment-479/800/300",
  "mimeType": "image/png",
  "sizeBytes": 13699798,
  "createdAt": "2025-08-20T04:55:01.385Z"
}