example-data.com
Menu
Browse docs and collections

Overview

attachments / #410

Activity #410

User #82 attached image/png (3332652 bytes)

10/17/2025, 2:15:16 AM

Component variants

Medium
Small

User #82 attached image/png (3332652 bytes) · 10/17/2025, 2:15:16 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 410,
  "userId": 82,
  "targetType": "recipe",
  "targetId": 56,
  "url": "https://picsum.photos/seed/attachment-410/800/600",
  "mimeType": "image/png",
  "sizeBytes": 3332652,
  "createdAt": "2025-10-17T02:15:16.379Z"
}