example-data.com
Menu
Browse docs and collections

enrollments

enrollments

Page 4 of 21.

Overview

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/enrollments?limit=25"
);
const { data, meta } = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/enrollments.d.ts https://example-data.com/types/enrollments.d.ts
import type { Enrollment, ListEnvelope } from "./types/enrollments";

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

Python example

import requests

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

Response

{
  "data": [
    {
      "id": 73,
      "userId": 35,
      "courseId": 21,
      "enrolledAt": "2025-03-14T04:29:34.842Z",
      "completedAt": null,
      "progressPercent": 12,
      "createdAt": "2025-03-14T04:29:19.132Z"
    },
    {
      "id": 74,
      "userId": 36,
      "courseId": 73,
      "enrolledAt": "2026-04-05T18:30:44.111Z",
      "completedAt": null,
      "progressPercent": 91,
      "createdAt": "2026-04-05T18:27:44.963Z"
    },
    {
      "id": 75,
      "userId": 37,
      "courseId": 15,
      "enrolledAt": "2026-04-10T09:42:45.289Z",
      "completedAt": null,
      "progressPercent": 19,
      "createdAt": "2026-04-10T09:41:57.814Z"
    }
  ],
  "meta": {
    "page": 4,
    "limit": 24,
    "total": 501,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/enrollments?page=4&limit=24",
    "first": "/api/v1/enrollments?page=1&limit=24",
    "last": "/api/v1/enrollments?page=21&limit=24",
    "next": "/api/v1/enrollments?page=5&limit=24",
    "prev": "/api/v1/enrollments?page=3&limit=24"
  }
}