You can follow the steps below to connect Power BI to Language Weaver.
Full details on the Language Weaver API can be found in the Cloud API documentation.
1. Getting the connection details
You will need to have at hand the following information in order to establish the connection with Language Weaver.
- <Account ID>: This is the account you will report on. To find out the Account ID, log into the Language Weaver portal (https://portal.languageweaver.com/) and click on [Username] > User Details.
- <Client ID> and <Client Secret>: A Client ID and a Client Secret are the equivalent to a user and a password used to connect to Language Weaver via the API. If you need to create new ones, log into the Language Weaver portal (https://portal.languageweaver.com/) as an admin user and click on Settings > API Credentials. Then click on the + Create API Credentials button to create them.
2. Creating the tables in Power BI
Follow the steps below to create a table in Power BI for each query. In each case, replace <Account ID>, <Client ID> and <Client Secret> with the actual data.
- From Power BI, click on Home > Get data > Blank query.
- In the Power Query Editor, right click on the newly created query and then click on Advanced Editor.
- In the Advanced Editor, delete the default code and paste the code from the samples below (section 3. Sample queries). Make sure you replace the <placeholder> tags with the actual data.
- Click on Done.
- Click on Edit Credentials if you are asked to specify how to connect.
- Go to the Anonymous tab and click on Connect. A new table will be created with the results of the query. You can remove or reorder columns as needed.
- Right click on the query and then click on Rename to assign a proper name to the query.
- Repeat the previous steps for each of the reporting queries you wish to run.
3. Sample queries
Use the sample code below to create reporting queries via Power BI.
Remember to replace the following placeholder tags with the actual data:
- <Client ID>
- <Client Secret>
- <Account ID>
- <Start date>
Format: yyyy/MM/dd
Example: For 30 June 2022, use 2022/06/30 - <End date>
Format: yyyy/MM/dd
Example: For 10 April 2022, use 2022/04/10
Applications |
let /* Authentication */ /* Call */ response = Web.Contents( /* Response */ in |
Groups |
let /* Authentication */ /* Call */ response = Web.Contents( /* Response */ in |
Labels |
let /* Authentication */ /* Call */ response = Web.Contents( /* Response */ in |
Language Pairs |
let /* Authentication */ /* Call */ response = Web.Contents( /* Response */ in |
Users |
let /* Authentication */ /* Call */ response = Web.Contents( /* Response */ in |