we are using elasticsearch and want to save/load the state of the grid. Report offers exactly that, however we have a problem:
Our dataSource setup:
This works great on its own. It requests the data at our address ‘https://localhost/some/paths/elastic/index/_mapping’ for the mapping data. Perfect.
Thank you for reporting the problem.
The issue is going to be fixed with a minor update ETA Sep 21.
We will notify you as soon as the version with a fix is available to download.
Also, we want to explain the origin of the problem and propose temporary workarounds.
requestHeaders property of the
dataSource object is not saved with the rest of the report as described in our documentation.
It leads to the difference between the request URL depending on the presence of request headers. For example, in your case, the request URL is “https://localhost/some/paths/elastic/index/_mapping” when request headers are present and “http://elastic/index/_mapping” when they are absent.
After the fix, both cases will be treated equally, leading to the correct output: “https://localhost/some/paths/elastic/index/_mapping“.
As for now, we recommend considering using the full path to the data source.
Another option is to complement the report with request headers before it is passed to Flexmonster. For example, it is possible to manually load the report to the page, add the
requestHeaders property to the
dataSource object, and set the resulting report using the setReport API call.
We hope it works for you.
Please let us know in case other questions arise.
We are happy to let you know that the issue with composing request URL with headers was fixed.
This is available in the 2.8.16 version of Flexmonster: https://www.flexmonster.com/release-notes/.
You are welcome to update the component.
Here is our updating to the latest version tutorial for guidance.
Please contact us in case any questions arise.
Our team is wondering whether the recently provided fix managed to resolve the issue.
We are looking forward to hearing from you.
Oh, I’m sorry. I didn’t know you waited for a reply.
Yes! It works great now. Much appreciated!
As per your update, I tried to save the report having request headers in datasource.
But after saving the report, the downloaded json file doesn’t include the headers, it only includes the api url.
Can you please confirm, how can I achieve this?
I want to pass the large amount of data as param to api url used as datasource. I can’t use the GET api because of size limitation.
Please let me know ASAP.
Thank you for writing to us.
Please note that the request headers not being saved to the report is the expected behavior – this is done for security purposes.
Regarding the second point, based on your question we assume you’re talking about passing particular parameters to your custom data source API instance. If so, we would suggest considering the
cusomizeAPIRequest() API call, which allows you to customize the requests sent to the server for the custom data source API.
This, for example, allows you to set custom request headers containing information about the current user/session, which can then be used on the server to filter the data depending on the user.
Please let us know if this applies to your use case.
Thanks for the fast response.
Is it must to implement APIs at server side for “field, member and select” like CubeController. If yes, is there any other way?