example-data.com
Menu
Browse docs and collections

Overview

attachments / #703

Activity #703

User #93 attached image/webp (48454274 bytes)

6/23/2025, 3:24:39 PM

Component variants

Medium
Small

User #93 attached image/webp (48454274 bytes) · 6/23/2025, 3:24:39 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 703,
  "userId": 93,
  "targetType": "comment",
  "targetId": 1491,
  "url": "https://picsum.photos/seed/attachment-703/1200/600",
  "mimeType": "image/webp",
  "sizeBytes": 48454274,
  "createdAt": "2025-06-23T15:24:39.443Z"
}