Is there is a way to create/generate/config/manage alerts in Prometheus through an API?

Fellas, I am using Prometheus and Prometheus-Alertmanager for our in-house Metrics setups and I am wondering if there is a way to create/generate/config/manage alerts in Prometheus through an API call?

Hey <@U011X86GZBK>, it looks like only the GET method is supported through the Alerts API endpoint: https://prometheus.io/docs/prometheus/latest/querying/api/#alerts

Thanks. Yeah, I saw the GET method but I am looking at Post and apparently there is no post for this. So we need to use the Configuration Management tool (like Ansible) to set it up…

It looks like the Alerts endpoint is only new, perhaps POST will be supported one day. But for now Ansible is probably your best bet to copy rule files then POST a reload request to Prometheus