Webservice Pagination with Multiple Account Aggregation Operations

Which IIQ version are you inquiring about?

8.3p1

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

Hi All,

I have two two operations for account aggregation in Web services connector. Could you please advise in operation I will to handle the pagination script?

1st Operation details:

URL: /report?q=Page=$offset$,PageSize=$limit$
JSON Response:

{
    "Rsp": {
        "Status": "Ok",
        "Result": [
            {
                "Guid": "121232-213123"
            },
            {
                "Guid": "121232-213124"
            }
       ]
}


Pagingscript:
$offset$ = $offset$ + 1
TERMINATE_IF  "$response.Rsp.Result$" == NULL
$endpoint.fullUrl$ = $application.baseUrl$ + "/report?q=Page=" + $offset$ + ",PageSize=" + $limit$

2nd Operation:

URL: /record/$response.Guid$
JSON Response:

{
    "Rsp": {
        "Status": "Ok",
        "Result": [
            {
                "Guid": "121232-213123",
                "Name: "test1",
                "Email: "[email protected]",
            },
            {
                "Guid": "121232-213124"
                "Name: "test2",
                "Email: "[email protected]",
            }
       ]
}

Am I supposed to just use the pagination script just in 1st operation or in both.

Can Pagination script work in case of multiple endpoints or I should use an Web service after operation rule instead? Please advise.

Hi @raovenu

QQ: how come 2nd end point returning details of different guid even after passing guid in the url for specific user??

Keep that a question a part you can use paging in both endpoint

Thanks

HI @Sriindugula,

GUID is same, first end point unfortunately only returns GUIDs then I use 2nd end point get the user details.

I tried the same Pagination script in both endpoint but the pagination process continues for ever and the TERMINATEIF logic does not work. I removed the 2nd endpoint just to see the behavior and pagination works great. I was not quite sure the standard to follow when we have multiple endpoints since the 2nd one does not need any pagination and depends on the results from the 1st endpoint.

Hi @raovenu

Pagination script works in the first operation instance if there are multiple aggregation operations as given here:

Even after defining the pagination script in the 1st endpoint and just keeping the 2nd endpoint (without pagination script), does paging not work?

Try Changing the condition for the TERMINATION from
TERMINATE_IF “$response.Rsp.Result$” == NULL
to
TERMINATE_IF $RECORDS_COUNT$ < $sysparm_limit$

We are using 8.3 and 8.3 connector guide does not specifically talk about pagination with multiple endpoints. Probably this is address in 8.4. Please let me know if I am missing anything between versions.

@gurbaz008 - Pagination works fine with one endpoint and termination logic works fine, all complications start when I add the second endpoint.

Hi @raovenu ,

Have you perhaps tried to have the pagination return 1 GUID per iteration? The requests are going to attempt to run synchronously.

I have this example below that I have just tested with a sequential aggregation operation and is working fine for me.

Let me know if this helps.

Thanks,

1 Like

Thanks Everyone, you’re all correct. I have tried the same pagination script only in the first endpoint and things work as expected.

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