example-data.com
Menu
Browse docs and collections

Overview

attachments / #788

Activity #788

User #89 attached image/jpeg (22618323 bytes)

10/15/2025, 4:27:33 AM

Component variants

Medium
Small

User #89 attached image/jpeg (22618323 bytes) · 10/15/2025, 4:27:33 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 788,
  "userId": 89,
  "targetType": "comment",
  "targetId": 968,
  "url": "https://picsum.photos/seed/attachment-788/800/300",
  "mimeType": "image/jpeg",
  "sizeBytes": 22618323,
  "createdAt": "2025-10-15T04:27:33.804Z"
}