HPE OneView
1753912 Members
9047 Online
108810 Solutions
New Discussion

Re: Create multiple networks into one POST

 
genesisfan
Occasional Contributor

Create multiple networks into one POST

I'm able to create one network with the REST API, but I want to create multiple networks in one POST.

 

e.g. this below failed, but what should it be?

{
    "vlanId" : "10",
    "purpose" : "General",
    "name" : "vlan10-A",
    "smartLink" : true,
    "privateNetwork" : false,
    "connectionTemplateUri" : null,
    "ethernetNetworkType" : "Tagged",
    "type" : "ethernet-networkV2"
},
{ "vlanId" : "10", "purpose" : "General", "name" : "vlan10-B", "smartLink" : true, "privateNetwork" : false, "connectionTemplateUri" : null, "ethernetNetworkType" : "Tagged", "type" : "ethernet-networkV2" }
1 REPLY 1
ChrisLynch
HPE Pro

Re: Create multiple networks into one POST

Hello @genesisfan and welcome to the HP OneView Communities.

 

The Parent URI /rest/ethernet-networks does not support multiple network resources to be created in a single POST request.  You must use /rest/ethernet-networks/bulk.  There is a specific format to the JSON request.  Please review the documentation here.


I am an HPE employee

Accept or Kudo