HPE OneView
1827286 Members
3480 Online
109717 Solutions
New Discussion

OneView API post of multiple templates

 
SOLVED
Go to solution
Ismael-Rivera
Visitor

OneView API post of multiple templates

I'm trying to migrate templates from an older version to a newer and want to avoid having

to first break up the file from the get into individual templates  and second not having to invoke a post multiple times.

Is it possible to post a series of templates as an array?

1 REPLY 1
ChrisLynch
HPE Pro
Solution

Re: OneView API post of multiple templates

No.  The POST /rest/server-profile-templates API only allows a single object in the body.  When creating a profile template, each are validated and an async task is created to monitor the creation process.  Creating profile templates are fairly quick.  An alternate way you can accomplish this is to itterate through your array of profile templates within your code and then issue the POST call per profile template object.

I work at HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo