Reports & results API
This is a browser service on GitHub Pages. It calculates from the XER/XML text you supply and returns JSON results plus downloadable HTML. It is not a server-side HTTP/REST endpoint. Website users need no installation.
Direct JavaScript module
import {generateReport, listSchedules} from './src/public-api.js';
const source = {text: await file.text(), name: file.name, scheduleIndex: 1};
const schedules = listSchedules(source);
const {result, html} = await generateReport({
report: 'progress', source, options: {metric: 'activities'}
});Available report names: summary, revision-changes, progress, resources, lookahead, calendar, risk. XER schedule indices follow PROJECT record order. Use index 1 for single-project XML. Inputs are caller-owned; the API cannot read open website schedules, saved AI keys or repository files.
Embed from another website
Replace the URL with your GitHub Pages address. Validate both the message source and origin. Every response echoes your request ID. JSON results are in data.payload.result, and the printable document is in data.payload.html.
const frame = document.createElement('iframe');
const apiURL = new URL('https://YOUR-NAME.github.io/YOUR-REPO/api.html');
frame.src = apiURL.href;
frame.hidden = true;
document.body.append(frame);
window.addEventListener('message', event => {
if (event.origin !== apiURL.origin || event.source !== frame.contentWindow) return;
if (event.data.channel !== 'schedule-studio-api') return;
if (event.data.type === 'ready') frame.contentWindow.postMessage({
channel: 'schedule-studio-api', id: 'report-1', type: 'generate',
payload: {report: 'summary', source: {text: xerText, name: 'project.xer', scheduleIndex: 1}}
}, apiURL.origin);
if (event.data.id === 'report-1') console.log(event.data);
});Options
- Revision changes: supply
referencewith the same fields as source. Returns the complete multi-category comparison. - Progress:
metric: activities | time | physical | units. Units requireresourceId. - Resources:
level: 2, resourceId: ''. All resources remain separate. - Lookahead:
start: '2026-10-01', weeks: 6, wbsId: '', codeIds: [], status: 'all', search: ''. - Calendar:
calendarIdandyearare required. - Risk:
iterations, seed, minFactor, modeFactor, maxFactor, targetTaskId, targetDays, riskRegister. Returns duration percentiles and sensitivity, with model assumptions.
Errors return {ok:false,error}. Success returns {ok:true,payload}. Inputs are limited to 20 MiB each and risk simulations to 20 million task-trials. Processing runs in the caller's browser; large reports can briefly occupy its main thread. No report data is stored by this API page.