The API controller’s task is to accept and handle the custom data source API requests from Flexmonster Pivot. To simplify the request handling, Flexmonster.DataServer.Core.dll provides a set of ready-to-use methods that allow getting fields, members, and aggregated data. These methods belong to the DLL's IApiService class.
The GetFields() method returns a list of all fields with their types. Use this method to create the response to the /fields request. This method has two signatures:
Schema GetFields(string index)index is the same parameter as in the /fields request. Schema GetFields(FieldsRequest request)request has the FieldsRequest type. FieldsRequest is a class from the DLL that describes the structure of the /fields request. Schema is a class from the DLL that describes the structure of the response to the /fields request.
The GetMembers() method returns a list of all field members. Use this method to create the response to the /members request. This method has the following signatures:
MembersResponse GetMembers(string index, Field field, int page, LogicFilter filter, [IEnumerable<ServerFilter> serverFilter])index, field, filter, and page are the same parameters as in the /members request. serverFilter is an optional parameter containing the server filters.MembersResponse GetMembers(MembersRequest membersRequest, [IEnumerable<ServerFilter> serverFilter])membersRequest has the MembersRequest type. MembersRequest is a class from the DLL that describes the structure of the /members request. serverFilter is an optional parameter containing the server filters.MembersResponse GetMembers(MembersRequest membersRequest, ServerFilter serverFilter)membersRequest has the MembersRequest type. MembersRequest is a class from the DLL that describes the structure of the /members request. serverFilter contains the server filters.MembersResponse is a class from the DLL that describes the structure of the response to the /members request.
The GetAggregatedData() method returns the aggregated data. Use this method to create the response to the /select request for the pivot table, the flat table, or the drill-through view. This method has the following signatures:
SelectResponse GetAggregatedData(string index, Query query, int page, [IEnumerable<ServerFilter> serverFilter])index, query, and page are the same parameters as in the /select requests for the pivot table, the flat table, and the drill-through view. serverFilter is an optional parameter containing the server filters.SelectResponse GetAggregatedData(SelectRequest selectRequest, [IEnumerable<ServerFilter> serverFilter])selectRequest has the SelectRequest type. SelectRequest is a class from the DLL that describes the structure of the /select requests for the pivot table, the flat table, and the drill-through view. serverFilter is an optional parameter containing the server filters.SelectResponse GetAggregatedData(SelectRequest selectRequest, ServerFilter serverFilter)selectRequest has the SelectRequest type. SelectRequest is a class from the DLL that describes the structure of the /select requests for the pivot table, the flat table, and the drill-through view. serverFilter contains the server filter.SelectResponse is a class from the DLL that describes the structure of the responses to the /select requests for the pivot table, the flat table, and the drill-through view.
Note The DLL’s methods and classes can be overridden and adjusted to your needs.
Can't find your answer here?
Visit the FAQ page
Flexmonster Pivot Table & Charts is a JavaScript pivot table component for adding interactive reporting and data analysis to web applications. Users can summarize, filter, sort, and explore data in pivot tables and charts, drill into results, and export reports.
Flexmonster works in plain JavaScript and TypeScript projects. It also integrates with React, Next.js, Angular, Vue, Blazor, and other technologies. See all integration options.
Flexmonster supports JSON and CSV files, SQL databases, MongoDB, Elasticsearch, and Microsoft Analysis Services (SSAS). You can also connect other data sources through your own backend. See supported data sources.
Flexmonster offers licenses for internal corporate use, SaaS products, and OEM distribution. Pricing varies by license and plan. SaaS projects can also use the free SaaS Entry license during development. Learn more on the pricing page.
Yes. Flexmonster offers a 30-day free trial that lets you evaluate all its features. No credit card is required. The trial version has a watermark.
To get started with Flexmonster, follow our integration guide.