VMware Cloud Community
Sunshine_S
Enthusiast
Enthusiast
Jump to solution

API response gets truncated causing vRO workflow to fail

The workflow uses this API call to get deployment details:

/deployment/api/deployments/<deployment-id>/resources

The response is then parsed and the workflow looks for "Cloud.vSphere.Machine".

From this, "properties.resourceName" is captured and is used for next steps.
 
However, some deployments have a large number of additional disks, around 15-20.
For these deployments, the response contains only the disk information. There is no block for "Cloud.vSphere.Machine"
I believe that the response is getting truncated. How can I get the complete response without any truncation?

vRealize Orchestrator version is 8.10.1.20718255

Edit: I cannot use "skip" because the same workflow is used for all deployments. So for those where there are no additional disks, putting a skip will return no items. Is there any way I can specifically request for "Cloud.vSphere.Machine"? Can the response skip particular type of object? "type":"Cloud.vSphere.Disk"

Labels (4)
0 Kudos
1 Solution

Accepted Solutions
bdamian
Expert
Expert
Jump to solution

In the response (JSON), you have a property "content" which is the information you need.

But in the response you also have "last", if is true, you have all the content. If it is false, the content is truncated.

Another property is "size" which indicate the number of elements in "content". First try to add "?size=200" to the end of the Request URL. If you have more than 200 items, you will need to create some kind of recursive method adding 1 to the property "number".

 

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian

View solution in original post

0 Kudos
1 Reply
bdamian
Expert
Expert
Jump to solution

In the response (JSON), you have a property "content" which is the information you need.

But in the response you also have "last", if is true, you have all the content. If it is false, the content is truncated.

Another property is "size" which indicate the number of elements in "content". First try to add "?size=200" to the end of the Request URL. If you have more than 200 items, you will need to create some kind of recursive method adding 1 to the property "number".

 

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
0 Kudos