
Hi, Indeed, it is not possible to create multiple entities in a single POST request. It adds some complexity - for example what happens if the creation of one of the entities has succeeded and another has not? There are all sorts of corner cases which complicates matters and this goes against the simplicity and straightforwardness that a RESTful API should have. In summary, the way to created multiple resources is to issue a separate POST request for each one. Hope this helps, Ori On Thu, Dec 20, 2018 at 3:42 PM Greg Sheremeta <gshereme@redhat.com> wrote:
doc: http://ovirt.github.io/ovirt-engine-api-model/4.3/#services/assigned_tags
It looks impossible, and it might not be "RESTful". Ondra or Ori would know for sure (cc'd)
Best wishes, Greg
On Thu, Dec 20, 2018 at 8:26 AM Mahesh Falmari <Mahesh.Falmari@veritas.com> wrote:
Hi Nir and RedHat Team,
Any updates on this?
Thanks & Regards, Mahesh Falmari
*From:* Mahesh Falmari *Sent:* Tuesday, December 18, 2018 5:16 PM *To:* 'Nir Soffer' <nsoffer@redhat.com> *Cc:* Pavan Chavva <pchavva@redhat.com>; Nisan, Tal <tnisan@redhat.com>; Erin Howrigan <ehowriga@redhat.com>; Adelino Barbosa <adbarbos@redhat.com>; devel <devel@ovirt.org>; Navin Tah <Navin.Tah@veritas.com>; Abhay Marode <Abhay.Marode@veritas.com>; James Olson <James.Olson@veritas.com>; Ranjit DSouza <Ranjit.DSouza@veritas.com>; Daniel Erez <derez@redhat.com>; Suchitra Herwadkar <Suchitra.Herwadkar@veritas.com> *Subject:* Adding multiple VM NICs or VM tags in a single request
Hi Nir and RedHat Team,
Would like to confirm if it is possible to create multiple VM tags or multiple VM NICs in a single POST request. Currently, I could see that a single request creates a single VM NIC or VM tag for a given virtual machine. We are using the following APIs but looks like it doesn’t allows us to add multiple VM NICs or VM tags in a single request. If it is possible, please let us know how the request body should look like in that case.
*POST /vms/{vm:id}/tags*
Request body: <tags>
<name>tag1</name>
</tags>
*POST /vms/{vm:id}/nics *Request body: <nic>
<name>network1</name>
</nic>
Thanks & Regards, Mahesh Falmari _______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/4V3FPZFWVOIBLB...
--
GREG SHEREMETA
SENIOR SOFTWARE ENGINEER - TEAM LEAD - RHV UX
Red Hat NA
gshereme@redhat.com IRC: gshereme <https://red.ht/sig>