Anyone figured out how to create a cluster via the API?

Writing some automation in python to deploy new clusters via the rest api.

It seems you must have a cluster id first, but haven’t figured out how to generate one. I tried creating one from scratch as a shot in the dark and nada. Was wanting to avoid digging down into the rancher cli go code and unraveling it.

How to create a cluster in SUSE Rancher v2.x using the Rancher CLI or v3 API

Rancher typically handles cluster IDs automatically when you create a cluster through its UI or API. If you’re working via the CLI or API, you don’t need to generate an ID manually—Rancher will assign one.