Enabling AutoDevops via API/Command line

Hi,

I am investigating some of the possibilities of AutoDevops, to enable easy adoption in an existing codebase I am wondering about how to enable Auto Devops.

A lot of the information I can find on the GitLab website and Youtube tutorials describe Enabling Auto Devops via the UI.

Whilst this is viable, it might cause some impediment to adoption, so I would like to know if it is possible to Enable Auto DevOps via the GitLab API (so we could script something to create a pipeline, pull in common Node or Java examples/maven poms, and then enable auto devops), or if there is a way we can set at project level "If there is no gitlab ci .yml file, to automatically use Auto Dev Ops with a given configutation (auto deploy to staging, manual to prod)?

Thanks in advance,

Tim