example-data.com
Menu
Browse docs and collections

Overview

attachments / #564

Activity #564

User #131 attached image/webp (4819290 bytes)

12/17/2025, 5:30:56 AM

Component variants

Medium
Small

User #131 attached image/webp (4819290 bytes) · 12/17/2025, 5:30:56 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 564,
  "userId": 131,
  "targetType": "recipe",
  "targetId": 85,
  "url": "https://picsum.photos/seed/attachment-564/800/600",
  "mimeType": "image/webp",
  "sizeBytes": 4819290,
  "createdAt": "2025-12-17T05:30:56.819Z"
}