04-30-2025 04:06 AM
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!
04-30-2025 05:30 AM
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.
04-30-2025 05:42 AM - edited 04-30-2025 05:44 AM
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
05-02-2025 06:46 AM - edited 05-02-2025 06:56 AM
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!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide