Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Your question provides a good overview of the problem you're facing, but it could be a bit more specific to help others understand the issue better. Here's a revised version of your question that adds some additional detail:
Hello Power BI Community,
I'm having trouble accessing data from an API in Power BI. The API is a GET endpoint, and I need to pass filters to retrieve the data. The developer informed me that the API only supports basic authentication and provided me with an encoded user credential.
Specifically, I'm uncertain about how to:
{
"WorkCenter": 1,
"WorkCenterCode": "sample string 1",
"StartDate": "2024-01-30T12:39:44.6483715-05:00",
"EndDate": "2024-01-30T12:39:44.6483715-05:00"
}
The URL looks something like this (omitted a few details in the URL fro confidentiality):
https://operations.example.com/rest/Help/Api/GET-api-zero-equipmentdowntime-reportrawdata_workCenter...
I have no idea how to go about it and any help and guidance would be extremely appreciated.
Any guidance on how to set up the query in Power BI to retrieve data from this API would be greatly appreciated.
Thank you!
Hi @kaym ,
Based on the details you have provided, it appears that you need guidance on building URLs with filter parameters, adding basic authentication, and setting up queries in Power BI. Let us address each of these in turn.
1. To include filter parameters in an API call, you typically need to append them to the URL as query parameters. Since the API is a GET endpoint, you can format the URL this way:
https://operations.example.com/rest/Help/Api/GET-api-zero-equipmentdowntime-reportrawdata_workCenter?WorkCenter=1&WorkCenterCode=sample%20string%201&StartDate=2024-01-30T12:39:44.6483715-05:00&EndDate=2024-01-30T12:39:44.6483715-05:00
For more information on building URLs with filters in Power BI, see the following:
Filter a report using query string parameters in the URL - Power BI | Microsoft Learn
2. To perform basic authentication using encoded user credentials, you can follow these steps in Power BI:
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
63 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |