I want to download a PDF after search automatically, but the search is produced by crontab, so I need to generate the PDF automatically too.
Is it better do this by call API?
I am not sure..
There is a option PDF schedule delivery.
You can save your search as dashboard panel view and in the settings on the top right corner and schedule PDF delivery.
When define the CRON scheduler, it runs the dash boards view of the search and email it you.
This is the one of the option you can opt for .