example-data.com
Menu
Browse docs and collections

Overview

attachments / #708

Activity #708

User #5 attached application/pdf (43873490 bytes)

6/23/2025, 7:10:57 AM

Component variants

Medium
Small

User #5 attached application/pdf (43873490 bytes) · 6/23/2025, 7:10:57 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 708,
  "userId": 5,
  "targetType": "restaurant",
  "targetId": 70,
  "url": "https://example.com/files/attachment-708.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 43873490,
  "createdAt": "2025-06-23T07:10:57.155Z"
}