example-data.com
Menu
Browse docs and collections

Overview

attachments / #82

Activity #82

User #197 attached image/jpeg (9887678 bytes)

1/11/2026, 3:57:55 AM

Component variants

Medium
Small

User #197 attached image/jpeg (9887678 bytes) · 1/11/2026, 3:57:55 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 82,
  "userId": 197,
  "targetType": "comment",
  "targetId": 1026,
  "url": "https://picsum.photos/seed/attachment-82/400/300",
  "mimeType": "image/jpeg",
  "sizeBytes": 9887678,
  "createdAt": "2026-01-11T03:57:55.758Z"
}