example-data.com
Menu
Browse docs and collections

Overview

attachments / #641

Activity #641

User #166 attached image/png (45127813 bytes)

5/17/2026, 8:03:15 PM

Component variants

Medium
Small

User #166 attached image/png (45127813 bytes) · 5/17/2026, 8:03:15 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 641,
  "userId": 166,
  "targetType": "recipe",
  "targetId": 276,
  "url": "https://picsum.photos/seed/attachment-641/800/600",
  "mimeType": "image/png",
  "sizeBytes": 45127813,
  "createdAt": "2026-05-17T20:03:15.824Z"
}