Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hey,
I want to get some data from our employees absences from the tool we use called timebutler. Unfortunately they only accept http POST requests and Power BI seems to use GET. I have a link (https://timebutler.de/api/v1/absences) and an API Token. According to the documentary a CSV UTF-8 coded will be provided. I also have to set a parameter for the year (YYYY). So my question now is... How.. 😄 I am a newbie regarding these M queries so I am looking forward to your help for generating a customized query in M.
Greets
Hi @SarahAlsterspre ,
let
apiToken = "your_api_token_here",
year = "2022",
url = "https://timebutler.de/api/v1/absences",
headers = [
#"Content-Type" = "application/json",
#"Authorization" = "Bearer " & apiToken
],
options = [
Headers = headers,
Content = Text.ToBinary("year=" & year),
ManualStatusHandling = {400, 404}
],
response = Web.Contents(url, options),
statusCode = Value.Metadata(response)[Response.Status],
result = if statusCode = 200 then
Csv.Document(response, [Delimiter=",", Encoding=65001, QuoteStyle=QuoteStyle.None])
else
error "Request failed with status code: " & Text.From(statusCode)
in
result
Please refer to the following document for more information.
Power Query Web connector - Power Query | Microsoft Learn
Pull data from API using POST method in Power BI - Microsoft Fabric Community
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.