Pricing changes are coming in January. Contact our Sales team to secure the current price for your desired license.

How to hide datasource in exported json

Answered
Jesica asked on December 12, 2024

Hello team. We have added a button to save the reports as json on local computer.

 

 

 

 

the issue we have here is that the datasource is exported in the structure. Can we avoid this? This could allow a user to see data they shouldn't

 

 

 

Thanks!!

3 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster December 16, 2024

Hello,

Thank you for reaching out to us.

We recommend using the getReport API call to get the current report configuration. Then, you can preprocess the JSON by deleting the dataSource object before downloading the report. Please check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/dz4gnx6j/.

Kindly note that to open the created report, you should add the data source object back to the JSON object.

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,
Nadia

Public
Jesica December 16, 2024

Thank you Nadia, will try and get back to you with the answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster December 17, 2024

Hello Jesica,

Thank you for the response!

We will be looking forward to hearing your feedback.

Kind regards,
Nadia

Please login or Register to Submit Answer