Creating a new Subnet via API


Hello Sonar
I was unable to use cidr and creation_method, its throwing me an error message
error": {
“message”: “Subnet is invalid.”,
“status_code”: 422
I was looking at the API document its did not say I can create an automated subnet. Is that something I can expect in coming days or its a no go.
We are trying to create a one click configuration file. If I can utilize automated subnet via API it would be helpful to get my tasks faster.
or is there a way I can use it.



Can you provide some more information about exactly what you’re trying to do? The exact request and endpoint you’re using would be helpful.


Is there a way I can use automatic subnet option to post my values and create a new subnet.


No, you need to specify all the values required in the API. We don’t have a helper exposed to find an available subnet via the API.


Can expect that feature in coming days.


There won’t be any API changes in v1 at this point, there are options in v2 for this.


Is V2 available? does updating sonar software enables these options?


Not currently.