example-data.com
Menu
Browse docs and collections

Overview

attachments / #393

Activity #393

User #11 attached image/webp (8314282 bytes)

12/29/2025, 10:00:05 AM

Component variants

Medium
Small

User #11 attached image/webp (8314282 bytes) · 12/29/2025, 10:00:05 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 393,
  "userId": 11,
  "targetType": "restaurant",
  "targetId": 97,
  "url": "https://picsum.photos/seed/attachment-393/800/300",
  "mimeType": "image/webp",
  "sizeBytes": 8314282,
  "createdAt": "2025-12-29T10:00:05.059Z"
}