example-data.com
Menu
Browse docs and collections

attachments

attachments

Page 34 of 34.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/attachments?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/attachments?limit=25"
);
const { data, meta } = 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, ListEnvelope } from "./types/attachments";

const res = await fetch(
  "https://example-data.com/api/v1/attachments?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Attachment>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/attachments",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 793,
      "userId": 222,
      "targetType": "post",
      "targetId": 376,
      "url": "https://picsum.photos/seed/attachment-793/1200/800",
      "mimeType": "image/webp",
      "sizeBytes": 32383630,
      "createdAt": "2025-05-25T17:07:32.685Z"
    },
    {
      "id": 794,
      "userId": 207,
      "targetType": "restaurant",
      "targetId": 84,
      "url": "https://picsum.photos/seed/attachment-794/400/300",
      "mimeType": "image/webp",
      "sizeBytes": 8560247,
      "createdAt": "2026-03-28T03:25:18.128Z"
    },
    {
      "id": 795,
      "userId": 90,
      "targetType": "recipe",
      "targetId": 9,
      "url": "https://picsum.photos/seed/attachment-795/1200/600",
      "mimeType": "image/png",
      "sizeBytes": 24729234,
      "createdAt": "2025-10-09T09:37:06.785Z"
    }
  ],
  "meta": {
    "page": 34,
    "limit": 24,
    "total": 800,
    "totalPages": 34
  },
  "links": {
    "self": "/api/v1/attachments?page=34&limit=24",
    "first": "/api/v1/attachments?page=1&limit=24",
    "last": "/api/v1/attachments?page=34&limit=24",
    "next": null,
    "prev": "/api/v1/attachments?page=33&limit=24"
  }
}