cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
543
Views
0
Helpful
3
Replies

Accessing Intersight data from power BI ?

Paulo Abreu
Level 1
Level 1

Hi, anyone managed to connect Power BI to intersight using the REST API ? I've tried following some guidelines but couldn't achieve it.

I created the API Key and got the secret Key, with some online help managed to setup the Power BI query to invoke a local python script to create the required HMAC to make the request to the Intersight API, but get the error 401 on return from the API, with:

{"code":"AuthenticationFailure","message":"Cannot process the request. The cookie 'X-Starship-Token' is invalid.","messageId":"iam_cookie_invalid","messageParams":{"1":"X-Starship-token"},"traceId":"ivLkk3LpVdlB2hXnL89VzCnvQ_PcY8DOXhlbIdJNzcC2yJiWgqoilw=="}

What is this X-Starship-Token cookie and how can I get it? or if there's a simplier way??

Thanks in advance for any help or guideline!

3 Replies 3

Torbjørn
VIP
VIP

Hello @Paulo Abreu, Welcome to the community!

You will need to supply some more information:
Can you post the request you are using or the code? What authentication method are you using? 
X-Starship-Token should be set to your API key if that is your chosen auth method.

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev

Thanks @Torbjørn for your help. I am not very familiar with python, but here it goes:

An example of the request tested in browser:

http://127.0.0.1:5000/intersight?endpoint=compute/PhysicalSummaries

This is the request to the local http server running the python script that makes the call to the API. The script is attached (I masked the API key as KKKKKK and the secret Key as SSSSSS).

Thanks. Regards

Torbjørn
VIP
VIP

I unfortunately don't have anywhere to test the code currently as the Intersight sandbox has been removed. Hence I think it would probably take a while to figure out the auth as I am unable to test & verify. I would suggest using the Intersight Python SDK to avoid handling auth yourself: https://github.com/CiscoDevNet/intersight-python. Alternatively you could use that to try to reverse engineer what your requests should look like. Good luck!

Happy to help! Please mark as helpful/solution if applicable.
Get in touch: https://torbjorn.dev