Netbox - API to PowerBI Gateway #15575
Replies: 3 comments
-
I would be interested in this too. Thinking about introducing Netbox to our infrastructure. Did you find a solution elsewhere? |
Beta Was this translation helpful? Give feedback.
-
You can disable authentication entirely: That will give read-only access to Netbox, but it will be open to the world. It may be acceptable if you are doing sufficient access control on an upstream proxy. Users will still need to login (or provide a token) to make changes to the database. But I'd suggest flipping this on the head: if your BI system is so crippled that it can't issue a GET request with authentication headers, then build a small HTTP proxy which adds the authentication headers, and put it in a network location where it can only be accessed from the BI system. |
Beta Was this translation helpful? Give feedback.
-
OK, I got this working. Sorry for the Screenshots being in German and sorry if I translate something wrong. But if you know Power BI / Fabric, I bet you know what is shown and how to adapt it to your environment ;-) In Power BI Desktop, you create a new Datasource of Type Web. When creating the Datasource, switch to the more / enhanced tab. You enter your Netbox API URL in the URL-Parts field and in the HTTP request headers field, you create a new one called "Authorization", where the value is "token ". Press OK to confirm. If Power BI asks you for an Authentication scheme, select Anonymous. Because you are already providing the AuthToken in the Web Datasource configuration! Create your report, upload it to your Workspace and then open the settings of the semantic model. This will tell you that the Gateway is not configured properly. Select Create a connection/Add to Gateway from here, this will pre-populate most of the connection settings for you: In the connection creation wizard, give your connection a proper name and set Authentication to Anonymous. Make sure to skip the Test of the connection, because the Gateway will try to connect to the API without a token: Create / save the new connection and Fabric will send you back to the settings of the semantic model. Here you need to map the entry to the connection you just created: And that's it. You will now be able to update your Semantic models. Why does it work? I am not 100% sure, but I am pretty confident that we have to use Anonymous, because when creating the Datasource in Power BI Desktop, you already provide the HTTP request header with the Token and this is part of the definition of the Datasource itself. Usually in Power BI you need 2 settings to get a Datasource working: The type/address of the Datasource itself and in a 2nd step the authentication mechanism/credentials. Since we authenticate on the connection URL by setting the HTTP request header already, the subsequent Authentication mechanism has nothing to do anymore and can handle the connection as "anonymous". There is no need to authenticate twice :-) |
Beta Was this translation helpful? Give feedback.
-
Hi Everyone.
We have Netbox installed and we are succesfully using API to get data from Netbox into our PowerBI Desktop.
I have been trying to configure the API Call in PowerBI on a PowerBI Gateway server.
This would let us schedule GET commands in PowerBI Cloud.
However we are recieving authentication errors in PowerBI Cloud.
Is it possible to authenticate to Netbox API without a Token ?
Beta Was this translation helpful? Give feedback.
All reactions