example-data.com
Menu
Browse docs and collections

Overview

attachments / #364

Activity #364

User #31 attached image/webp (34178392 bytes)

5/3/2026, 7:38:16 PM

Component variants

Medium
Small

User #31 attached image/webp (34178392 bytes) · 5/3/2026, 7:38:16 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 364,
  "userId": 31,
  "targetType": "comment",
  "targetId": 284,
  "url": "https://picsum.photos/seed/attachment-364/600/800",
  "mimeType": "image/webp",
  "sizeBytes": 34178392,
  "createdAt": "2026-05-03T19:38:16.349Z"
}