Cloud
Облачный сервис для быстрого и эффективного анализа и визуализации данных для вашего бизнеса без необходимости создания своих приложений и программирования.
function RunReport() {
var sessionKey = Connect(); // GET /1/login with x-sti-UserName/Password headers
// Create a snapshot
var snap = new XMLHttpRequest();
snap.open('POST', 'http://localhost:40010/1/reportsnapshots', false);
snap.setRequestHeader('x-sti-SessionKey', sessionKey);
snap.send(JSON.stringify({ Ident: 'ReportSnapshotItem', Name: '001', Expires: expires }));
var snapshotKey = JSON.parse(snap.responseText).ResultItems[0].Key;
// Run the template into the snapshot
var run = new XMLHttpRequest();
run.open('PUT', 'http://localhost:40010/1/reporttemplates/' + reportKey + '/run', false);
run.setRequestHeader('x-sti-SessionKey', sessionKey);
run.setRequestHeader('x-sti-DestinationItemKey', snapshotKey);
run.send();
// Share the snapshot and open its public URL
// PUT /1/items/{snapshotKey}/share -> GET .../share -> location.href = ResultUrl
}Connect() — GET /1/login with credential headers, returning the ResultSessionKey.POST /reportsnapshots → /reporttemplates/{key}/run → /items/{key}/share — snapshot, run, then share for a public URL.XMLHttpRequest calls chain the Server's REST endpoints, so a browser page can run and publish a report with no backend of its own.