03 Dec 2024 08:07 AM - last edited on 04 Dec 2024 11:15 AM by Julius_Loman
I need to call IAM API secured by OAuth from my custom app
${environmentUrl}/platform/iam/v1/organizational-levels/environment/${environmentId}/users
I cannot find the react dynatrace-sdk library for that API.
When I call that API from app page/component, the expected result is returned. The issue is that I need to write a lot of boilerplate code for handling such call manually.
Recommended way to call APIs are app functions. In such case, useAppFunction provides that boilerplate code out of box.
The problem is that authentication is not used while calling that API from app function (got 401: Authentication required).
Is there any way to pass the bearer token from the application to the app function via payload when using useAppFunction?
Are there any other recommended methods to call "internal" APIs secured by OAuth and for which dynatrace-sdk library does not exist? Or is there a way to reuse dynatrace-sdk boilerplate code for that?
04 Dec 2024 11:17 AM
@PennyScully any recommendations how to call such platform APIs?