Creating a new Subnet via API


#1

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.


#2

Hi,

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.


#3


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


#4

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.


#5

Can expect that feature in coming days.


#6

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


#7

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


#8

Not currently.