VMware Cloud Community
mcfadyenj
Hot Shot
Hot Shot
Jump to solution

rest plugin usage

hi all,

I am a little new to the rest plugin trying to work out best practice.

i have correctly configured rest host and operations and subsequently returning xml responses.

when processing those responses i just need to return an ID for the rest object. I need to post the returned object from a get operation into a new post operation.

would you normally hack up the response with the xml plugin to reuse the response id in the new post operation?

or is there a way to pass that returned object back with additional data such as a new childobject

my current rest operation call is like this

GET /systems?name={Name}

this correctly returns that object which i then need to reuse as

POST /systems/{returnedObjectId}/newChildItem/{new data object}

the only way i can see to this is hack up the response to get the id. is that correct?


0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Correct. But you don't need XML plug-in to parse the response from your GET operation.

The easier way is to use the native E4X XML object.

View solution in original post

0 Kudos
1 Reply
iiliev
VMware Employee
VMware Employee
Jump to solution

Correct. But you don't need XML plug-in to parse the response from your GET operation.

The easier way is to use the native E4X XML object.

0 Kudos