example-data.com
Menu
Browse docs and collections

enrollments

enrollments

Page 19 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": 433,
      "userId": 215,
      "courseId": 77,
      "enrolledAt": "2025-09-30T16:43:03.534Z",
      "completedAt": null,
      "progressPercent": 93,
      "createdAt": "2025-09-30T16:39:48.189Z"
    },
    {
      "id": 434,
      "userId": 216,
      "courseId": 39,
      "enrolledAt": "2025-07-19T14:30:20.177Z",
      "completedAt": null,
      "progressPercent": 95,
      "createdAt": "2025-07-19T14:29:51.838Z"
    },
    {
      "id": 435,
      "userId": 216,
      "courseId": 19,
      "enrolledAt": "2025-10-27T17:34:21.634Z",
      "completedAt": null,
      "progressPercent": 21,
      "createdAt": "2025-10-27T17:30:40.064Z"
    }
  ],
  "meta": {
    "page": 19,
    "limit": 24,
    "total": 501,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/enrollments?page=19&limit=24",
    "first": "/api/v1/enrollments?page=1&limit=24",
    "last": "/api/v1/enrollments?page=21&limit=24",
    "next": "/api/v1/enrollments?page=20&limit=24",
    "prev": "/api/v1/enrollments?page=18&limit=24"
  }
}