HPE OneView
1828371 Members
3025 Online
109976 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 work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo