example-data.com
Menu
Browse docs and collections

Overview

attachments / #563

Activity #563

User #153 attached application/pdf (42402091 bytes)

6/4/2025, 5:38:02 AM

Component variants

Medium
Small

User #153 attached application/pdf (42402091 bytes) · 6/4/2025, 5:38:02 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 563,
  "userId": 153,
  "targetType": "comment",
  "targetId": 618,
  "url": "https://example.com/files/attachment-563.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 42402091,
  "createdAt": "2025-06-04T05:38:02.113Z"
}