WebServices Pagination in IIQ

Version 8.4

Hi All,

I have a use case to do pagination in webservice using before and after rule and
I have explored IdentityIQ compaas and discussion forum found
these ways to achieve pagination in webservices in IIQ
1.using paging steps in webservice connector if we can offset and limit webservice application
2.Before rule and After rule

I tried to use them from the sample provided by sailpoint but I don’t know what the values I should provide in transient values map and how to use hasmore both in before rule and after rule

is there any other way to achieve pagination in webservices

thank you

I have the same issue uday

I suggest to you download and read the connector documentation:

At pg 55 start to explain the pagination with before/after rule. At the end with before/after is like a manual management of the offset.

1 Like

Hi @udaykiran,

Please go through below link. It has sample for pagination. Let us know if you are facing some issue with its implementation.

Thanks

I went through these rule i’m facing issue at getting and setting of transientValues any idea or example code that get and set the transientValues

thank you
avi

Hi @amulpuru,

See the below code and let me know if any input needed. If you need something specific to your response and request, then please share the sample for the same.

Note:
This After Rule stores the “cursor” and “has_more” values, from the response, in a map named ‘transientValues’ in the Application object. This map will store the necessary information which will be used by the BEFORE RULE to manipulate the next API call. Please note that the flag indicating whether the managed system contains more records is stored by the key named “hasMore”. This field is MANDATORY as it will the deciding factor for aborting the pagination requests.

Gson gson = new Gson();
  JsonObject jsonObject = JsonParser.parseString(rawResponseObject).getAsJsonObject();
  String cursor = jsonObject.get("cursor").getAsString();
  boolean hasMore = jsonObject.get("has_more").getAsBoolean();

  if(Util.isNotNullOrEmpty(cursor)) {
    Map transientValues = application.getAttributeValue("transientValues");
    if(transientValues == null) {
      transientValues = new HashMap();
      application.setAttribute("transientValues", transientValues);
    }
    transientValues.put("cursor", cursor);
    transientValues.put("hasMore", hasMore);
  }
1 Like

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