I would like to clone an existing dashboard automatically every time I upload a new file with a specific prefix (E.G: File-xx). The only element that would change in the dashboard code would be the search file name. Is there a way to do so?
cron with sed -i if running on unix? May not be what you're after and may not be responsive enough, but would also need to know what 'new' means in that context. (timestamp vs xx number)
Are you looking to do this in a source controlled manner? If so, you could source control the file mentioned in this answer https://answers.splunk.com/answers/445179/dashboard-xml-file-does-not-exist.html, and automatically insert a new template with that parameter passed through. I wouldn't suggest tampering with this file without source control, as you might delete everything 😧