example-data.com
Menu
Browse docs and collections

Overview

attachments / #33

Activity #33

User #220 attached image/jpeg (38387976 bytes)

9/12/2025, 9:17:06 AM

Component variants

Medium
Small

User #220 attached image/jpeg (38387976 bytes) · 9/12/2025, 9:17:06 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 33,
  "userId": 220,
  "targetType": "recipe",
  "targetId": 73,
  "url": "https://picsum.photos/seed/attachment-33/600/800",
  "mimeType": "image/jpeg",
  "sizeBytes": 38387976,
  "createdAt": "2025-09-12T09:17:06.219Z"
}