example-data.com
Menu
Browse docs and collections

attachments

attachments

Page 12 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": 265,
      "userId": 86,
      "targetType": "restaurant",
      "targetId": 27,
      "url": "https://picsum.photos/seed/attachment-265/400/300",
      "mimeType": "image/jpeg",
      "sizeBytes": 18517719,
      "createdAt": "2025-06-30T01:32:48.703Z"
    },
    {
      "id": 266,
      "userId": 230,
      "targetType": "recipe",
      "targetId": 47,
      "url": "https://picsum.photos/seed/attachment-266/400/800",
      "mimeType": "image/jpeg",
      "sizeBytes": 49941378,
      "createdAt": "2026-02-14T19:35:10.810Z"
    },
    {
      "id": 267,
      "userId": 200,
      "targetType": "restaurant",
      "targetId": 98,
      "url": "https://picsum.photos/seed/attachment-267/600/800",
      "mimeType": "image/webp",
      "sizeBytes": 16896215,
      "createdAt": "2025-08-11T07:52:54.262Z"
    }
  ],
  "meta": {
    "page": 12,
    "limit": 24,
    "total": 800,
    "totalPages": 34
  },
  "links": {
    "self": "/api/v1/attachments?page=12&limit=24",
    "first": "/api/v1/attachments?page=1&limit=24",
    "last": "/api/v1/attachments?page=34&limit=24",
    "next": "/api/v1/attachments?page=13&limit=24",
    "prev": "/api/v1/attachments?page=11&limit=24"
  }
}