example-data.com
Menu
Browse docs and collections

Overview

attachments / #318

Activity #318

User #73 attached image/png (10018138 bytes)

8/21/2025, 6:18:31 AM

Component variants

Medium
Small

User #73 attached image/png (10018138 bytes) · 8/21/2025, 6:18:31 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 318,
  "userId": 73,
  "targetType": "restaurant",
  "targetId": 36,
  "url": "https://picsum.photos/seed/attachment-318/800/800",
  "mimeType": "image/png",
  "sizeBytes": 10018138,
  "createdAt": "2025-08-21T06:18:31.770Z"
}