Rupinder Kaur 2 Posted September 26, 2023 Share Posted September 26, 2023 I need to get the data from an API, and the API is JWT 2I intended; hence, it is required to pass the 2I token. Link to comment Share on other sites More sharing options...
Fredrik Rosell Posted October 2, 2023 Share Posted October 2, 2023 Hello Rupinder,I noticed that there has been no response to this question. I'm not familiar with 2I tokens, and I have yet to find anyone else that is either so it may help if you describe your use case in more detail/provide any references you have.Best RegardsFredrik Link to comment Share on other sites More sharing options...
Rupinder Kaur 2 Posted October 2, 2023 Author Share Posted October 2, 2023 Hi Fredrik,Thanks for reaching out. I need to display the data on the Spotfire dashboard from the API. It's the JWT-protected API, so I am required to pass the token and authorization in the header. I would like to know how it can be done, if there is a script or a data function that can help me do the same. So, the moment the dashboard gets opened, the API should run automatically and display the data on the page.Thanks! Link to comment Share on other sites More sharing options...
Peter McKinnis Posted October 6, 2023 Share Posted October 6, 2023 Rupinder,The IronPython Scripting in Spotfire page has a few examples like this one IronPython Script to call a REST web service with Authentication. If needed, you could convert this into a python data function. The data function should be able to run at analysis open. If you go with IronPython, you can use the Custom DataTime Data Function for Spotfire which can trigger an IronPython script at analysis open.Hope these are helpful.Regards,Peter Link to comment Share on other sites More sharing options...
Rupinder Kaur 2 Posted October 11, 2023 Author Share Posted October 11, 2023 We need a script that can take care of the automatic generation of the token. Basically, perform the below tasks: 1) Get a request to get token authentication.2) Post a request to get the output with the header client ID, SSO, and authorization key generated in step 1.Response output will be JSON.4) After that, we need a code that can convert JSON to a datatable or dataframe.Thanks! Link to comment Share on other sites More sharing options...
Fredrik Rosell Posted October 12, 2023 Share Posted October 12, 2023 Hello Rupinder,I recommend that you reach out to your Spotfire Sales contact to discuss a services engagement, if you need assistance with implementing this.Best RegardsFredrik Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now