Flexmonster custom data source API is designed for summarized data retrieval from a server to Flexmonster Pivot.
This API will work for projects with their own data access layer, where filtering and aggregation are delegated to a server and Flexmonster receives ready-to-show data.
Inside the /server-nodejs folder you can find the sample Node.js server that implements Flexmonster's custom data source API. All requests from Flexmonster Pivot Table are handled by http://localhost:3400/api/cube endpoints. Raw data is stored in JSON format in the /server-nodejs/data folder. The file name matches the index property of the dataSource configuration object.
To start the server:
cd server-nodejs
npm install
npm start
On the client-side, the configuration looks as follows (check /client/index.html):
new Flexmonster({
container: "#pivot",
report: {
"dataSource": {
"type": "api",
"url": "http://localhost:3400/api/cube",
"index": "fm-product-sales"
}
}
});Inside the /server-dotnetcore folder you can find another Flexmonster's custom data source API implementation - sample .NET Core server. All requests from Flexmonster Pivot Table are handled by http://localhost:3400/api/cube endpoints. Raw data is stored in JSON format in the /data folder. The file name matches the index property of the dataSource configuration object.
To start the server:
cd server-dotnetcore
dotnet run
On the client-side, the configuration looks like in Sample Node.js server