How to iterate through the number of pages retuned by the CloudFoundry API

In Cloud Foundry API there is a limit of only 100 entries can’t be retrieved more than 100. Also there is no link between each page response sent by the Cloud Foundry.

How do we fetch the number of entries returned by the response json

  • How to loop through based on the number of pages returned. For now they have hardcoded as shown below.

As we cannot configure these using the Pagination option present in Rest Job using GRAPHQL.

Beginner Asked on March 2, 2021 in Diyotta Studio.
Add Comment
1 Answer(s)

In the Rest Job, we have an option to store the response parameters which is In memory. These Response Parameters can be used in the consecutive jobs and use the replaced values.

So the Cloud Foundry response which has the number of pages included in it can be stored in the Response parameter as shown below.

RE: How to iterate through the number of pages retuned by the CloudFoundry API

Use the value stored in the response parameter in the looper to iterate through the pages.

RE: How to iterate through the number of pages retuned by the CloudFoundry API

This Looper Parameter has page values that can be passed into the Webservices Job as a page iteration value parameter and iterate through the pages.

RE: How to iterate through the number of pages retuned by the CloudFoundry API

 

Expert Answered on March 5, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.