example-data.com
Menu
Browse docs and collections

Overview

attachments / #535

Activity #535

User #83 attached image/png (13720398 bytes)

3/28/2026, 6:26:24 PM

Component variants

Medium
Small

User #83 attached image/png (13720398 bytes) · 3/28/2026, 6:26:24 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 535,
  "userId": 83,
  "targetType": "recipe",
  "targetId": 33,
  "url": "https://picsum.photos/seed/attachment-535/400/400",
  "mimeType": "image/png",
  "sizeBytes": 13720398,
  "createdAt": "2026-03-28T18:26:24.315Z"
}