example-data.com
Menu
Browse docs and collections

Overview

attachments / #572

Activity #572

User #158 attached video/mp4 (39452254 bytes)

10/23/2025, 12:59:40 PM

Component variants

Medium
Small

User #158 attached video/mp4 (39452254 bytes) · 10/23/2025, 12:59:40 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 572,
  "userId": 158,
  "targetType": "comment",
  "targetId": 1245,
  "url": "https://example.com/files/attachment-572.mp4",
  "mimeType": "video/mp4",
  "sizeBytes": 39452254,
  "createdAt": "2025-10-23T12:59:40.178Z"
}