HPE OneView
1753609 Members
5923 Online
108797 Solutions
New Discussion

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