Accessing application properties in a Web Services after operation rule

I’d like to use a Web Services After Operation Rule to perform post processing on aggregation results.

I see that I get the application object, but not the instance object (I was hoping to use an existing source that holds configuration).

I’ve written custom properties for custom authentication requirements, can the same approach be used to hold configuration parameters for adjusting the behaviour of the rule?

Do those properties appear in the configuration object?

Thanks!

@josephcasale based on the question i think you are looking to make additional calls from AfterOperationRule. If you are looking for the access token that is generated by custom authentication you can get that using requestEndPoint. This object has a method called getHeader which will return you a Map. This Map can be passed to any of the call that you want to make from the rule.
If you are looking for anything different share more info.

Hi @josephcasale

Thank you for the question.

here you can retrieve any key defined on the application below steps

  1. import the application object using import sailpoint.object.Application

  2. Retrieve application source key (provided that this key is defined under connectorAttributes in source json). If you want to retrieve the key “test” then you can use the below code

application.getStringAttributeValue("test")

Then you can apply the logic based on the key value.

Regarding the authentication part, there is already an parameter available in the afterOperation rule for restClient of type sailpoint.connector.webservices.WebServicesClient which you can make use of. This is when the first aggregation is using the same authentication. You can use the code snippet like restClient.executeGet or restClient.executePost with proper parameters to make additional calls.

NOTE: This is for the cases when the already existing aggregation operation is using the same authentication which is the case for me for almost 90% of the cases.

In case you want to make a new API call which uses different authentication, then you can always create a new WebService client and then configure its URL, headers etc to meet you custom authentication. For this then you can use the applications keys to make these variable dynamic instead of harcoding them in the code as i mentioned above.

For more detailed information about WebService client java class and available methods, you can refer to the below documentation

I hope the information helps. In case you have any further questions, please feel free to let me know.

Regards
Vikas.

1 Like

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