@PouicPouic, what do you mean by “network part of the machine”?
in your JSON, you set the MAC address and gave the power address. the IP address will be assigned by MAAS when you commission / deploy it. what parts are you wanting to specify that you don’t have the json keys for?
You can have a look at some ansible-playbooks I wrote communicating with the api. It does pretty much everything. Create fabrics, vlans, configure dhcp, rename interfaces on machines, create bonds, vlans, bridges, ips and storage.
You might not need much ansible knowledge to parse out the urls you need to interact with and look up the documentation.
The files of interest are probably configure-maas-fabrics.yml, configure-maas-fabric-vlans.yml and quite possibly any of the configure-machine-interface-*.yml files.
In the case you’re familiar with ansible, the configuration variables for the fabrics come from the inventory here and this inventory sample for machines.
thx a lot.
your playbook help, i am not real strong in API.
if i understand , it s only when the machine is ready you can change network part?
i search to create machine with the network well config before the commissionning.
thx a lot again for you playbook, i hope to find the way to do what i want.