example-data.com
Menu
Browse docs and collections

Overview

attachments / #304

Activity #304

User #66 attached image/webp (49631379 bytes)

6/24/2025, 8:32:09 PM

Component variants

Medium
Small

User #66 attached image/webp (49631379 bytes) · 6/24/2025, 8:32:09 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 304,
  "userId": 66,
  "targetType": "restaurant",
  "targetId": 53,
  "url": "https://picsum.photos/seed/attachment-304/1200/300",
  "mimeType": "image/webp",
  "sizeBytes": 49631379,
  "createdAt": "2025-06-24T20:32:09.405Z"
}