example-data.com
Menu
Browse docs and collections

Overview

attachments / #698

Activity #698

User #84 attached video/mp4 (8220544 bytes)

6/6/2025, 1:05:43 PM

Component variants

Medium
Small

User #84 attached video/mp4 (8220544 bytes) · 6/6/2025, 1:05:43 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 698,
  "userId": 84,
  "targetType": "post",
  "targetId": 304,
  "url": "https://example.com/files/attachment-698.mp4",
  "mimeType": "video/mp4",
  "sizeBytes": 8220544,
  "createdAt": "2025-06-06T13:05:43.382Z"
}