Migrating from legacy to unified alerting when using git persistence

Hi,

We are using OSS Grafana, which is deployed with the kube-prometheus-stack, and git to persist our dashboards. I’m trying to find a smooth way to transfer the alerts over to the new unified alerting, but the /api/alerts in v9.1.4 doesn’t provide the query and threshold for each alert. I’m considering writing a script to convert the alerts from the json in git to a format that can be added in via the api, but was wondering if anyone had a smoother suggestion, or have already written a script for it?

Cheers!