Hello Justin,
There is a way to do this in the context of an SDK extension apart of the session. Take note that Caliper API is a SDK extension so everything that you can do with Caliper API you can do in an SDK extension. I will copy some of that code for you to be able to do what you are looking for. As a backdrop, Caliper API uses the AccessCode DbObject see documentation here: https://docs.q2developer.com/api_references/q2_sdk/db/db_objects/access_code.html#module-q2_sdk.hq.db.access_code
For showing the Caliper API code, I will not include input validation and parsing the data to be used in the API format and just focus on the base calls.
Get Tac Targets:
access_code_obj = AccessCode(self.logger, self.hq_credentials)
result = await access_code_obj.get_targets(logon_name=login_name,
exclude_email=False,
exclude_phone=False,
exclude_sms=False
)
Add Tac Targets:
access_code_obj = AccessCode(self.logger, self.hq_credentials)
response = await access_code_obj.create_targets(
logon_name=login,
target_address=target,
target_type=target_type,
)
Delete Tac Targets:
access_code_obj = AccessCode(self.logger, self.hq_credentials)
response = await access_code_obj.delete_accesscode_target(
logon_name=login,
ui_source='OnlineBanking',
target_address=target,
target_type=target_type
)