example-data.com
Menu
Browse docs and collections

Overview

attachments / #760

Activity #760

User #247 attached image/jpeg (43507089 bytes)

9/26/2025, 6:37:30 PM

Component variants

Medium
Small

User #247 attached image/jpeg (43507089 bytes) · 9/26/2025, 6:37:30 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 760,
  "userId": 247,
  "targetType": "restaurant",
  "targetId": 14,
  "url": "https://picsum.photos/seed/attachment-760/400/400",
  "mimeType": "image/jpeg",
  "sizeBytes": 43507089,
  "createdAt": "2025-09-26T18:37:30.672Z"
}