How to add custom parameters?

Answered
xingyu asked on April 29, 2022

I'm looking at a .NET Core server instance downloaded from github.

No custom extension parameters were found, there is one and only one index, and the fixed parameters still filter the data source. Because we are using a database query, we want to add a dynamic parameter

I don't see any custom parameters in the custom data api, I want to add some parameters to reduce the scope of database query.

Our users can only see their own data, but when querying reports, all user parameters must be put in. For each query, users only read their own data.

2 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster May 2, 2022

Hello,
 
Thank you for reaching out to us.
 
Flexmonster provides customizeAPIRequest - a call that allows customizing the request before sending it to a server.
Using the API call above, you can pass custom parameters to the request body and add custom request headers. Then, as you receive these parameters on the server, you can add the necessary logic.
For example, you can implement the server filter. The data would be filtered based on the user’s role sent by the component using request headers. They define which subset of data should correlate to the received role.
Please check the following guide for reference: https://www.flexmonster.com/doc/implementing-server-filter/#server-filter-example
 
Please let us know if it works for you. Feel free to contact us if other questions arise.
 
Kind regards,
Nadia

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster May 12, 2022

Hello,

Hope you are doing well.

We were wondering if you had a chance to test a suggested approach.

Looking forward to hearing your feedback.

Kind regards,
Nadia

Please login or Register to Submit Answer