Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
I have an API that now needs an API key for authentication. I have been trying all morning to get this to work but do not know where in the below I need to set the API Key, can anyone help please as I need to get my report back online as soon as possible?
jsonDoc= Json.Document(
Web.Contents(
"https://**************/api/v1/***/****tory", [RelativePath="/?&start=" & Number.ToText(n)])),
result = jsonDoc[result],
records = result[records],
tmpTbl = Table.FromList(records, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
Thanks
Hi @jdchipps ,
You may try codes like below.
jsonDoc= Json.Document(
Web.Contents(
"https://**************/api/v1/***/****tory", [RelativePath="/?&start=" & Number.ToText(n)], [ApiKeyName="APIToken"]) ),
result = jsonDoc[result],
records = result[records],
tmpTbl = Table.FromList(records, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
For reference:
https://blog.crossjoin.co.uk/?s=web.contents&submit=Search
https://blog.crossjoin.co.uk/2014/03/26/working-with-web-services-in-power-query/
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Your relative path structure is slightly inaccurate. But you can extend it as needed
jsonDoc= Json.Document(
Web.Contents(
"https://**************/api/v1/***/****tory", [RelativePath="/?APIKey=" & key & "&start=" & Number.ToText(n)])),
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
55 | |
54 | |
38 | |
29 |
User | Count |
---|---|
78 | |
62 | |
45 | |
40 | |
40 |