Education

Honors surface metadata (categories + milestones)

Return the Honors metadata envelope as {categories: [...], total, source}.

Behavior:

  • PG-populated: returns the categories[] envelope from PG via pg_get_milestones_by_category(). source = "pg"; total = sum of milestones across categories.
  • PG empty / unavailable: falls back to reading static/data/achievements.json so the surface stays renderable during the first-deploy window before the backfill runs. source = "empty" so the renderer can paint provenance accurately. Frontend (achievements.ts) ALSO has its own JSON fallback on 5xx (defense-in-depth layer 2).
  • JSON-fallback also fails: returns {categories: [], total: 0, source: "empty"} so the renderer's Array.isArray(data. categories) branch short-circuits to the polite empty-state copy rather than NPE.

No auth / tier gate — public editorial metadata (same posture as /api/learning/paths + /api/filers/featured). User-progress data (localStorage ol_achievements) is untouched by this route.

get/api/milestones

Request

  • Base URL: https://www.oxfordledge.com (the document declares no server; this is the origin it was published from)
  • URL: https://www.oxfordledge.com/api/milestones
  • Auth: none declared

Response

Successful Response

totalinteger required
sourcestring required

'pg' when categories came from PG, 'empty' otherwise.

Changes

No recorded changes to this operation across all 1 revision of this API.