Setup Cluster using API

How would I go about creating a cluster using the REST api?

Read the docs / lxc cluster X --debug and the follow the HTTP requests.

Doing this via the API is not documented. Thanks for the debug tip.

It is documented but ill give you its not particularly clear the order of operation without --debug first.

https://linuxcontainers.org/lxd/docs/master/api/#/cluster

They need to update the docs to explain that leaving the certificate a blank string makes it auto generate a certificate, because when you don’t put in the field it complains that there is no certificate there :joy:

Sounds like something you should open an issue about, though from a quick read the behaviour sounds sane.