example-data.com
Menu
Browse docs and collections

Overview

attachments / #378

Activity #378

User #66 attached image/png (33722901 bytes)

7/17/2025, 5:35:57 PM

Component variants

Medium
Small

User #66 attached image/png (33722901 bytes) · 7/17/2025, 5:35:57 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 378,
  "userId": 66,
  "targetType": "restaurant",
  "targetId": 29,
  "url": "https://picsum.photos/seed/attachment-378/800/800",
  "mimeType": "image/png",
  "sizeBytes": 33722901,
  "createdAt": "2025-07-17T17:35:57.182Z"
}