example-data.com
Menu
Browse docs and collections

Overview

attachments / #669

Activity #669

User #137 attached image/jpeg (28110429 bytes)

11/9/2025, 5:34:47 PM

Component variants

Medium
Small

User #137 attached image/jpeg (28110429 bytes) · 11/9/2025, 5:34:47 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 669,
  "userId": 137,
  "targetType": "recipe",
  "targetId": 299,
  "url": "https://picsum.photos/seed/attachment-669/600/400",
  "mimeType": "image/jpeg",
  "sizeBytes": 28110429,
  "createdAt": "2025-11-09T17:34:47.664Z"
}