Using CData APIServer™ 2026 - 26.1.9585.0
I created an API which connects to an Oracle stored procedure and another API which connects to Azure AD. I am trying to modify incoming request before calling the stored procedure.
For example, user sends { “WHOAMI”: “ [removed by moderator] ” } request, API Server calls Azure AD and gets sAMAccountName, then the stored procedure is called with { “WHOAMI”: “username” }
I tried something like following but I still calls procedure without changing value of WHOAMI:
<api:script xmlns:api="http://www.rssbus.com/ns/rsbscript/2"> <api:info title="[CDATA].[WHOAMI]" connection="ora2" restrictUser="" description="whoami"> <input name="WHOAMI" type="string" required="true" desc="e-mail" /> </api:info> <api:script method="POST"> <api:set attr="sAMAccountName" value="" /> <api:call op="apiSelect" in="table=[CData].[AzureAD].[Users]|filter=mail='[WHOAMI]'|columns=onPremisesSamAccountName"> <api:set attr="sAMAccountName" value="[onPremisesSamAccountName]" /> </api:call> <api:set attr="WHOAMI" value="[sAMAccountName]" /> <api:push op="apiExecuteSP" /> </api:script></api:script>