example-data.com
Menu
Browse docs and collections

Overview

attachments / #214

Activity #214

User #8 attached image/webp (42724438 bytes)

1/30/2026, 4:53:10 PM

Component variants

Medium
Small

User #8 attached image/webp (42724438 bytes) · 1/30/2026, 4:53:10 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 214,
  "userId": 8,
  "targetType": "restaurant",
  "targetId": 62,
  "url": "https://picsum.photos/seed/attachment-214/800/400",
  "mimeType": "image/webp",
  "sizeBytes": 42724438,
  "createdAt": "2026-01-30T16:53:10.042Z"
}