example-data.com
Menu
Browse docs and collections

Overview

attachments / #53

Activity #53

User #208 attached image/jpeg (21076305 bytes)

6/22/2025, 4:48:14 AM

Component variants

Medium
Small

User #208 attached image/jpeg (21076305 bytes) · 6/22/2025, 4:48:14 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 53,
  "userId": 208,
  "targetType": "recipe",
  "targetId": 205,
  "url": "https://picsum.photos/seed/attachment-53/400/800",
  "mimeType": "image/jpeg",
  "sizeBytes": 21076305,
  "createdAt": "2025-06-22T04:48:14.952Z"
}