Paging setting for JSON response that contains paging tags

Which IIQ version are you inquiring about?

8.2p6

Share all details about your problem, including any error messages you may have received.

Hello team!

I’m trying to implement paging in a web services connector for Group Aggregation. This is a snippet of the JSON I get from the endpoint:

{
    "group": [
	...
	],
    "paginationInfo": {
        "count": 36,
        "pagenum": 1,
        "pagesize": 25,
        "link": [
            {
                "rel": "next",
                "href": "/url/to/next/section/groups?$pagenum=2"
            }
        ]
    }
}

How can I retrieve the values from this response to configure paging dynamically?

Hi @ricardocr023,

There are multiple ways to do pagination in Web Services connector, But one of the easy and common way is to utilize the pagination tab in your aggregation operation.

You could configure it something like this,

Set your Context URL as - /groups?$pagenum=1

Initial Page Offset as - 1

Paging Steps,

TERMINATE_IF NO_RECORDS == TRUE
$offset$ = $offset$ + 1
$endpoint.fullUrl$ = $application.baseUrl$+ "/groups?$" + $offset$

This will keep on calling the endpoint with new page number until there are no records returned.

1 Like

Thank you so much Shandeep! I just implemented this and it worked as a charm!

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.