example-data.com
Menu
Browse docs and collections

Overview

attachments / #370

Activity #370

User #110 attached image/jpeg (7463862 bytes)

6/16/2025, 2:48:09 AM

Component variants

Medium
Small

User #110 attached image/jpeg (7463862 bytes) · 6/16/2025, 2:48:09 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 370,
  "userId": 110,
  "targetType": "recipe",
  "targetId": 119,
  "url": "https://picsum.photos/seed/attachment-370/400/400",
  "mimeType": "image/jpeg",
  "sizeBytes": 7463862,
  "createdAt": "2025-06-16T02:48:09.836Z"
}