When a dashboard reads data from a protected JSON endpoint, authentication headers can be attached in the onBeginProcessData event.

In React.
import { Viewer, Stimulsoft } from "stimulsoft-dashboards-js-react/viewer";

function App() {
    var report = new Stimulsoft.Report.StiReport();
    report.loadFile("Dashboards/OrdersUrl.mrt");

    report.onBeginProcessData = function (args) {
        if (args.database === "JSON" && args.command === "GetData") {
            args.headers.push({ key: "X-Auth-Token", value: "*YOUR TOKEN*" });
        }
    };

    var options = new Stimulsoft.Viewer.StiViewerOptions();
    options.appearance.fullScreenMode = true;

    return <Viewer options={options} report={report} />;
}

How it works. The engine sends the headers with its JSON fetch, so the dashboard can read endpoints behind token protection.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.