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(a)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(a)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(a)redhat.com>
> *Cc:* Pavan Chavva <pchavva(a)redhat.com>; Nisan, Tal <tnisan(a)redhat.com>;
> Erin Howrigan <ehowriga(a)redhat.com>; Adelino Barbosa
<adbarbos(a)redhat.com>;
> devel <devel(a)ovirt.org>; Navin Tah <Navin.Tah(a)veritas.com>; Abhay Marode
> <Abhay.Marode(a)veritas.com>; James Olson <James.Olson(a)veritas.com>;
> Ranjit DSouza <Ranjit.DSouza(a)veritas.com>; Daniel Erez
<derez(a)redhat.com>;
> Suchitra Herwadkar <Suchitra.Herwadkar(a)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(a)ovirt.org
> To unsubscribe send an email to devel-leave(a)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/4V3FPZFWVOI...
>
--
GREG SHEREMETA
SENIOR SOFTWARE ENGINEER - TEAM LEAD - RHV UX
Red Hat NA
<
https://www.redhat.com/>
gshereme(a)redhat.com IRC: gshereme
<
https://red.ht/sig>