example-data.com
Menu
Browse docs and collections

Overview

attachments / #13

Activity #13

User #13 attached image/jpeg (47377696 bytes)

9/13/2025, 2:25:55 PM

Component variants

Medium
Small

User #13 attached image/jpeg (47377696 bytes) · 9/13/2025, 2:25:55 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 13,
  "userId": 13,
  "targetType": "restaurant",
  "targetId": 81,
  "url": "https://picsum.photos/seed/attachment-13/600/600",
  "mimeType": "image/jpeg",
  "sizeBytes": 47377696,
  "createdAt": "2025-09-13T14:25:55.432Z"
}