HPE OneView
cancel
Showing results for 
Search instead for 
Did you mean: 

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
ChrisLynchHPE
Neighborhood Moderator

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.