example-data.com
Menu
Browse docs and collections

Overview

attachments / #609

Activity #609

User #167 attached image/png (42640477 bytes)

6/6/2025, 11:19:04 AM

Component variants

Medium
Small

User #167 attached image/png (42640477 bytes) · 6/6/2025, 11:19:04 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 609,
  "userId": 167,
  "targetType": "restaurant",
  "targetId": 27,
  "url": "https://picsum.photos/seed/attachment-609/800/400",
  "mimeType": "image/png",
  "sizeBytes": 42640477,
  "createdAt": "2025-06-06T11:19:04.178Z"
}