VMware Cloud Community
japerrin
Contributor
Contributor

vRO - Gettings VMs deployment name

Hi 

After each VMs deployment, through the event broker I run a workflow to build a HTML report with the list of VMs settings and send it to the requester by email.

In the report , I collect the deployment name with a Rest API request on vRA :

...

var restUrl = "catalog-service/api/consumer/resources"
var restMethod = "GET"
var restFilter = "name eq '" + vraVmName + "'"

I the workflow is launched manually its works fine, the deployment name is found.

 

But if the workflow is running by event broker, the deployment name is not found, The workflow is triggered on

  • Catalog request completed
  • Tasks equal PROVISION
  • Success = Yes

 

Any idea why ?

 

Regards

Jacques

 

 

Reply
0 Kudos
3 Replies
xian_
Expert
Expert

Is your REST endpoint configured with per user session? vRA use a different user from your vRO login credentials, and the API may not allow to read the same info.

Try to change it to shared session.

Reply
0 Kudos
japerrin
Contributor
Contributor

Hi Xian

it's already the case,  I use shared session with a service account.

I use also a dynamic Rest host (transient) to perform the query.

Another idea ?

Thanks

Jacques

Reply
0 Kudos
xian_
Expert
Expert

Can you try with a static, inventory REST host, with parallel requests support disabled?

Reply
0 Kudos