example-data.com
Menu
Browse docs and collections

Overview

attachments / #271

Activity #271

User #91 attached image/png (48714590 bytes)

9/24/2025, 12:03:07 PM

Component variants

Medium
Small

User #91 attached image/png (48714590 bytes) · 9/24/2025, 12:03:07 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 271,
  "userId": 91,
  "targetType": "recipe",
  "targetId": 188,
  "url": "https://picsum.photos/seed/attachment-271/800/600",
  "mimeType": "image/png",
  "sizeBytes": 48714590,
  "createdAt": "2025-09-24T12:03:07.795Z"
}