Forum Discussion
Trying to Connect to an API
Hello everyone,
I am trying to connect to an API.
https://napimsv2-be-6efe8ae.herokuapp.com/api/docs/swagger/#/clients/clients_combined_production_retrieve
(tweaked for security)
But I can't see the tables.
Hi Cesylyaa,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Thank you to the lbendlin,danextian, for your valuable insights. As mentioned, authentication is often the reason for seeing HTML code instead of actual data in the Navigator. By examining the HTML, you may find error messages like 401 Unauthorized or 403 Forbidden, which indicate authentication issues.
Additionally, referring to the API documentation, as recommended, is an excellent way to ensure you are using the correct endpoint and following the proper authentication process.
- Please ensure that you are using the correct API endpoint URL (e.g., /clients, /data) rather than any URLs intended for other purposes like API documentation.
- To authenticate in Power BI, go to Home → Get Data → Web, enter the API URL, and select the appropriate authentication method (API key, OAuth2, or Bearer Token). Provide the necessary credentials or tokens to ensure secure access and retrieve the API data for analysis.
- Before trying to connect in Power BI, test the API using tools such as Postman or curl.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
Hi Cesylyaa,
Thank you for your patience! could you confirm if the API returns structured data (such as tables, JSON, or XML) instead of an HTML response?
Here’s how to check:
- Open the API URL in your browser and check its response. If you see JSON or structured data, the API is functioning correctly. If it shows an HTML page, the API may not be returning data in the expected format, possibly due to an incorrect endpoint or missing request parameters.
- Use Postman to send a GET request to the API. If the response contains tables, JSON, or XML, the API returns structured data. If it returns HTML, the issue might be with the endpoint or required headers.
- If the API returns only HTML, it could indicate an incorrect endpoint (such as a documentation URL instead of a data URL) or missing required headers or parameters for a proper response.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
16 Replies
- lbendlinSuper User
You need to authenticate to that API. If you examine the HTML Code you will see the error message.
- CesylyaaHelper I
Hello,
i think that because i had previously attempted to authenticate without a password, when i input the link now, it just skips the authentication part.This is a screenshot of a portion of the html code.
- danextianSuper User
Hi Cesylyaa
There should be a documentaiton of some sort on how to get data using this API. This one is from Finnhub -https://finnhub.io/docs/api
- v-saisrao-msftCommunity Support
Hi Cesylyaa,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Thank you to the lbendlin,danextian, for your valuable insights. As mentioned, authentication is often the reason for seeing HTML code instead of actual data in the Navigator. By examining the HTML, you may find error messages like 401 Unauthorized or 403 Forbidden, which indicate authentication issues.
Additionally, referring to the API documentation, as recommended, is an excellent way to ensure you are using the correct endpoint and following the proper authentication process.
- Please ensure that you are using the correct API endpoint URL (e.g., /clients, /data) rather than any URLs intended for other purposes like API documentation.
- To authenticate in Power BI, go to Home → Get Data → Web, enter the API URL, and select the appropriate authentication method (API key, OAuth2, or Bearer Token). Provide the necessary credentials or tokens to ensure secure access and retrieve the API data for analysis.
- Before trying to connect in Power BI, test the API using tools such as Postman or curl.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
- CesylyaaHelper I
Hi, this is a screnshot of the html.
I tried to connect again, but it just bypasses the authentication and does not ask me about authentication.How can i get this authentication menu back?
- lbendlinSuper User
go to Data Source Settings. Clear permissions. Reauthenticate.
- CesylyaaHelper I
Hello,
I did speak to the backend developer who provided me the code.
He said there is no Username/password, so that implies no Authentication?
Is there still a workaround for this?
- v-saisrao-msftCommunity Support
Hi Cesylyaa,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.- CesylyaaHelper I
Hello,
I did speak to the backend developer who provided me the code.
He said there is no Username/password, so that implies no Authentication?
Is there still a workaround for this?- v-saisrao-msftCommunity Support
Hi Cesylyaa,
Thank you for your patience! could you confirm if the API returns structured data (such as tables, JSON, or XML) instead of an HTML response?
Here’s how to check:
- Open the API URL in your browser and check its response. If you see JSON or structured data, the API is functioning correctly. If it shows an HTML page, the API may not be returning data in the expected format, possibly due to an incorrect endpoint or missing request parameters.
- Use Postman to send a GET request to the API. If the response contains tables, JSON, or XML, the API returns structured data. If it returns HTML, the issue might be with the endpoint or required headers.
- If the API returns only HTML, it could indicate an incorrect endpoint (such as a documentation URL instead of a data URL) or missing required headers or parameters for a proper response.
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you.