example-data.com
Menu
Browse docs and collections

Overview

attachments / #152

Activity #152

User #190 attached image/jpeg (2424880 bytes)

10/22/2025, 6:42:46 PM

Component variants

Medium
Small

User #190 attached image/jpeg (2424880 bytes) · 10/22/2025, 6:42:46 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 152,
  "userId": 190,
  "targetType": "recipe",
  "targetId": 16,
  "url": "https://picsum.photos/seed/attachment-152/800/400",
  "mimeType": "image/jpeg",
  "sizeBytes": 2424880,
  "createdAt": "2025-10-22T18:42:46.719Z"
}