example-data.com
Menu
Browse docs and collections

Overview

attachments / #163

Activity #163

User #215 attached image/jpeg (15228783 bytes)

6/14/2025, 6:08:06 PM

Component variants

Medium
Small

User #215 attached image/jpeg (15228783 bytes) · 6/14/2025, 6:08:06 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 163,
  "userId": 215,
  "targetType": "recipe",
  "targetId": 59,
  "url": "https://picsum.photos/seed/attachment-163/800/400",
  "mimeType": "image/jpeg",
  "sizeBytes": 15228783,
  "createdAt": "2025-06-14T18:08:06.177Z"
}