example-data.com
Menu
Browse docs and collections

Overview

attachments / #375

Activity #375

User #208 attached image/jpeg (34080133 bytes)

2/26/2026, 7:41:45 AM

Component variants

Medium
Small

User #208 attached image/jpeg (34080133 bytes) · 2/26/2026, 7:41:45 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 375,
  "userId": 208,
  "targetType": "restaurant",
  "targetId": 100,
  "url": "https://picsum.photos/seed/attachment-375/800/300",
  "mimeType": "image/jpeg",
  "sizeBytes": 34080133,
  "createdAt": "2026-02-26T07:41:45.066Z"
}