example-data.com
Menu
Browse docs and collections

attachments

attachments

Page 32 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": 745,
      "userId": 241,
      "targetType": "product",
      "targetId": 152,
      "url": "https://example.com/files/attachment-745.mp4",
      "mimeType": "video/mp4",
      "sizeBytes": 9307130,
      "createdAt": "2025-08-18T03:02:50.140Z"
    },
    {
      "id": 746,
      "userId": 38,
      "targetType": "product",
      "targetId": 102,
      "url": "https://picsum.photos/seed/attachment-746/600/800",
      "mimeType": "image/webp",
      "sizeBytes": 42001551,
      "createdAt": "2025-09-18T00:09:23.005Z"
    },
    {
      "id": 747,
      "userId": 118,
      "targetType": "post",
      "targetId": 118,
      "url": "https://picsum.photos/seed/attachment-747/800/300",
      "mimeType": "image/webp",
      "sizeBytes": 11666930,
      "createdAt": "2026-05-10T21:53:05.469Z"
    }
  ],
  "meta": {
    "page": 32,
    "limit": 24,
    "total": 800,
    "totalPages": 34
  },
  "links": {
    "self": "/api/v1/attachments?page=32&limit=24",
    "first": "/api/v1/attachments?page=1&limit=24",
    "last": "/api/v1/attachments?page=34&limit=24",
    "next": "/api/v1/attachments?page=33&limit=24",
    "prev": "/api/v1/attachments?page=31&limit=24"
  }
}