example-data.com
Menu
Browse docs and collections

enrollments

enrollments

Page 17 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": 385,
      "userId": 190,
      "courseId": 9,
      "enrolledAt": "2025-07-29T22:27:24.490Z",
      "completedAt": null,
      "progressPercent": 14,
      "createdAt": "2025-07-29T22:23:21.879Z"
    },
    {
      "id": 386,
      "userId": 190,
      "courseId": 70,
      "enrolledAt": "2025-09-19T18:47:58.627Z",
      "completedAt": null,
      "progressPercent": 61,
      "createdAt": "2025-09-19T18:47:32.102Z"
    },
    {
      "id": 387,
      "userId": 190,
      "courseId": 45,
      "enrolledAt": "2025-07-20T01:01:55.139Z",
      "completedAt": null,
      "progressPercent": 10,
      "createdAt": "2025-07-20T01:01:00.545Z"
    }
  ],
  "meta": {
    "page": 17,
    "limit": 24,
    "total": 501,
    "totalPages": 21
  },
  "links": {
    "self": "/api/v1/enrollments?page=17&limit=24",
    "first": "/api/v1/enrollments?page=1&limit=24",
    "last": "/api/v1/enrollments?page=21&limit=24",
    "next": "/api/v1/enrollments?page=18&limit=24",
    "prev": "/api/v1/enrollments?page=16&limit=24"
  }
}