example-data.com
Menu
Browse docs and collections

enrollments

enrollments

Page 15 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": 337,
      "userId": 167,
      "courseId": 68,
      "enrolledAt": "2026-01-05T16:04:55.251Z",
      "completedAt": null,
      "progressPercent": 21,
      "createdAt": "2026-01-05T16:04:39.662Z"
    },
    {
      "id": 338,
      "userId": 168,
      "courseId": 25,
      "enrolledAt": "2026-02-12T05:14:05.439Z",
      "completedAt": null,
      "progressPercent": 9,
      "createdAt": "2026-02-12T05:10:38.865Z"
    },
    {
      "id": 339,
      "userId": 168,
      "courseId": 37,
      "enrolledAt": "2025-04-05T06:38:53.047Z",
      "completedAt": null,
      "progressPercent": 88,
      "createdAt": "2025-04-05T06:36:54.138Z"
    }
  ],
  "meta": {
    "page": 15,
    "limit": 24,
    "total": 501,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/enrollments?page=15&limit=24",
    "first": "/api/v1/enrollments?page=1&limit=24",
    "last": "/api/v1/enrollments?page=21&limit=24",
    "next": "/api/v1/enrollments?page=16&limit=24",
    "prev": "/api/v1/enrollments?page=14&limit=24"
  }
}