Is there an API endpoint for retrieving and executing saved scripts?
Hi Joe,
There isn’t currently an API endpoint for scripts. Could you describe what you’re looking to do with scripts via an API? We can take this into consideration for our roadmap.
I found it: /apiv2/scripts
Joe, that’s an internal endpoint and not supported for public use. It is subject to change at any time.
Thank you, Isha. Is there a public endpoint?
There isn’t currently an API endpoint for scripts. Could you describe what you’re looking to do with scripts via an API? We can take this into consideration for our roadmap.
We are thinking about possible usages for scripts. It could be useful for scripts that load data from some source into iceberg tables. I’ve tested this with a MERGE INTO statement in a script, but I have to run it from within the UI or a SQL client. Being able to kick off the script from an API call could be handy.
I’m sure that will work for executing the query, but we still need to get the SQL. I’m thinking it would be a handy use of the Scripts feature to store the SQL there and use the API to execute it.
Of course, ideally, Scripts would be schedulable and we could do it all within the Dremio UI!