As mentioned in the documentary there is the option to create functions above my OMS workspace using the Azure Log Analytics portal.
Is there an option to create a function using an API?
same as the API that is used for querying? (described here: https://dev.loganalytics.io/reference/post-query)
I couldn't find any documentation regarding this issue which will be very helpful for me.
When adding the functionAlias parameter to a savedSearches resource in ARM that will show up as a function in Log Analytics.
See below a snippet from a powershell script that we use for deploying functions with an ARM template.