example-data.com
Menu
Browse docs and collections

Overview

attachments / #293

Activity #293

User #67 attached image/png (44024152 bytes)

7/3/2025, 8:18:35 AM

Component variants

Medium
Small

User #67 attached image/png (44024152 bytes) · 7/3/2025, 8:18:35 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 293,
  "userId": 67,
  "targetType": "restaurant",
  "targetId": 73,
  "url": "https://picsum.photos/seed/attachment-293/400/300",
  "mimeType": "image/png",
  "sizeBytes": 44024152,
  "createdAt": "2025-07-03T08:18:35.892Z"
}