example-data.com
Menu
Browse docs and collections

Overview

attachments / #466

Activity #466

User #123 attached image/jpeg (6279227 bytes)

10/19/2025, 1:24:12 AM

Component variants

Medium
Small

User #123 attached image/jpeg (6279227 bytes) · 10/19/2025, 1:24:12 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 466,
  "userId": 123,
  "targetType": "comment",
  "targetId": 1221,
  "url": "https://picsum.photos/seed/attachment-466/800/300",
  "mimeType": "image/jpeg",
  "sizeBytes": 6279227,
  "createdAt": "2025-10-19T01:24:12.452Z"
}