Authenticate using D2L's Valence OAuth 2.0 flow: register an application via the D2L Developer Portal, obtain an access token with the data export scope, and pass it as a Bearer token in the Authorization header.
List available Brightspace Data Sets (BDS) plugins by calling GET /d2l/api/lp/(version)/dataExport/bds/list; each plugin entry includes a pluginId and a description of the dataset.
Download a full dataset by calling GET /d2l/api/lp/(version)/dataExport/bds/download/(pluginId); the response is a ZIP file containing one or more CSV files representing the dataset.
For Advanced Data Sets (ADS), submit an export job via POST to /d2l/api/lp/(version)/dataExport/jobs providing the exportJobId and desired filters; then poll GET /d2l/api/lp/(version)/dataExport/jobs/(exportJobId) until the status field is complete.
Download the completed ADS export via GET /d2l/api/lp/(version)/dataExport/download/(exportJobId); the response is a ZIP file — parse the enclosed CSV files for the specific data (e.g., enrollments, grades, logins).
Schedule regular BDS pulls; full BDS datasets are regenerated on a platform-managed cadence (typically daily or weekly depending on the dataset size and configuration), so polling more frequently than the regeneration interval returns the same snapshot.
Known gotchas
BDS downloads return a complete snapshot each time — there is no built-in delta capability for BDS; to detect changes you must compare successive snapshots or switch to ADS with date-range filters.
The Valence API version string in the URL path is a decimal (e.g., 1.26) and must match a version supported by the target instance; calling an unsupported version returns a 404 rather than a helpful version mismatch error.
ADS exports are asynchronous; submitting a job does not immediately return data — polling the job status endpoint is required and jobs can take several minutes for large datasets, requiring timeout and retry logic.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp