example-data.com
Menu
Browse docs and collections

Overview

attachments / #139

Activity #139

User #110 attached image/png (20933395 bytes)

5/30/2025, 2:37:46 PM

Component variants

Medium
Small

User #110 attached image/png (20933395 bytes) · 5/30/2025, 2:37:46 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 139,
  "userId": 110,
  "targetType": "restaurant",
  "targetId": 40,
  "url": "https://picsum.photos/seed/attachment-139/600/400",
  "mimeType": "image/png",
  "sizeBytes": 20933395,
  "createdAt": "2025-05-30T14:37:46.871Z"
}