WebServices connector does not execute updated requestEndPoint URL

On 8.3p2, I’m using a WebServiceBeforeOperationRule to update the call that’s executed during aggregation, but the updated URL on the requestEndPoint isn’t executed. It’s executing the URL stored on the app config.

I’ve tried setting the requestEndPoint full/context URLs, building the URL with java.net.URL, returning a new EndPoint object, using %26 instead of &… But the updated URL is never used

log.info( String.format(" getContextUrl Before: %s", requestEndPoint.getContextUrl()) );
requestEndPoint.setContextUrl( requestEndPoint.getContextUrl() + "&limit=3" );
log.info( String.format(" getContextUrl After: %s", requestEndPoint.getContextUrl()) );

log.info( String.format(" getFullUrl Before: %s", requestEndPoint.getFullUrl()) );
requestEndPoint.setFullUrl( requestEndPoint.getFullUrl() + "&limit=3" );
log.info( String.format(" getFullUrl After: %s", requestEndPoint.getFullUrl()) );

return requestEndPoint;

Prints as expected:

getContextUrl Before: users?&section=primary&location=true
getContextUrl After: users?&section=primary&location=true&limit=3
getFullUrl Before: https://my.api.com:PORT/v1/users?&section=primary&location=true
getFullUrl After: https://my.api.com:PORT/v1/users?&section=primary&location=true&limit=3

But aggregation runs the old query!

Hi @gageet

Welcome to SailPoint Developer Community!

I would suggest trying to enable the Webservice loggers and please confirm the same.

sailpoint.connector.webservices.WebSvicesConnector
sailpoint.connector.webservices.WebServiceConnectorUtil

Thanks @Jarin_James , I enabled the Loggers and found that although requestEndPoint.getFullUrl() appeared correct after setting it programmatically, the call actually sent had the characters improperly encoded, so the API was ignoring them (which would match the old query)

This worked:

String usersUrl = "%26userId=";
int remain = userIdsToQuery.size() - userIndex;
int bound = QUERY_LIMIT >= remain ? userIndex + remain : userIndex + QUERY_LIMIT;
usersUrl += String.join("%2C", userIdsToQuery.subList(userIndex, bound));

requestEndPoint.setFullUrl( requestEndPoint.getFullUrl() + usersUrl );
return requestEndPoint;

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