example-data.com
Menu
Browse docs and collections

Overview

attachments / #647

Activity #647

User #154 attached image/webp (8200364 bytes)

9/18/2025, 12:49:23 PM

Component variants

Medium
Small

User #154 attached image/webp (8200364 bytes) · 9/18/2025, 12:49:23 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 647,
  "userId": 154,
  "targetType": "recipe",
  "targetId": 35,
  "url": "https://picsum.photos/seed/attachment-647/400/400",
  "mimeType": "image/webp",
  "sizeBytes": 8200364,
  "createdAt": "2025-09-18T12:49:23.975Z"
}