example-data.com
Menu
Browse docs and collections

Overview

attachments / #601

Activity #601

User #182 attached image/webp (22990566 bytes)

8/10/2025, 6:35:43 AM

Component variants

Medium
Small

User #182 attached image/webp (22990566 bytes) · 8/10/2025, 6:35:43 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 601,
  "userId": 182,
  "targetType": "restaurant",
  "targetId": 71,
  "url": "https://picsum.photos/seed/attachment-601/1200/300",
  "mimeType": "image/webp",
  "sizeBytes": 22990566,
  "createdAt": "2025-08-10T06:35:43.374Z"
}