Using Tables and Validation APIs with PowerBI
Step-by-step guide on how to use data from Anker into your PowerBI dashboards
Here you can find all the instructions for updating Power BI datasets with an API key to secure report results and data from tables. The steps include copying a new data URL in Anker, creating a new data set or updating an existing one in Power BI, and generating an API key in Anker. Screenshots and code examples are provided to illustrate the process.
Watch the video to see the whole process
Copy a new data URL in Anker
If you don’t have an existing report in Power-BI, you can find exposed API links in two places in Anker:
- In tables:
2. Report link in validation view:
Create a new dataset in Power-BI
1. Select Web in Get data dropdown:
2. In Advance settings, insert the API link of the table or validation, then below insert a header: “X-Anker-Api-Key” and then your API key and click OK.
(To format the data like CSV format, use the following command “?format=csv” at the end of your table/validation API URL)
Update an existing dataset in Power-BI
- In a Data panel, right-click on your existing data set and select Edit query:
2. In the Source step, edit the query with the updated Header parameter:
Update the code with your API link and API key:
= Json.Document(Web.Contents("<new-table-or-validation-url>", [Headers=[#"X-Anker-Api-Key"="<your-api-key>"]]))
The finale value should look like this:
= Json.Document(Web.Contents("https://api.ankerdb.com/elementview/v1/d/validation/9054b066-9703-4bb3-b36c-c7bd7c2ede57",[Headers=[#"X-Anker-Api-Key"="SQcmtCjIyDDA8wvUAisfFUJ4YQDAXFoOyd1_eEBEf58"]]))
How to generate the API key in Anker
1. Go to My Account:
2. Click on the Add button to generate a new API key:
3. Type a name of your new API key and click Generate:
4. Now you can copy the key to the clipboard and close the modal. Remember: you will see the token only once, if you forget to copy it, you will have to generate a new key!
5. Go back to Power-BI and paste the new key in the URL header mentioned above.