You can follow the steps below to connect Power BI to Language Weaver Edge.
Full details on the Language Weaver API can be found in the Edge 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 Edge.
- <API Base URL>: This is the URL that will be used to connect to the Language Weaver Edge API. To find out the API server host and port, log into the Language Weaver Edge Web GUI as an admin user and click on [Username] > My Account.
The URL will be something like https://languageweaveredge-url.com:8001/api/v2. - <API Key>: This is a credential equivalent to a user and password that allows you to access Language Weaver Edge via the API. To find out the API Key, log into the Language Weaver Edge Web GUI as an admin user and click to [Username] > My Account.
The API Key will be something like u_user@example.com_NM2ba8j9pHQ2.
2. Creating the tables in Power BI
Follow the steps below to create a table in Power BI for each query with all the historical data.
- From Power BI, click con Home > Get data > Web.
- In the From Web window, add any of the following queries depending on what you need to report.
Report Type Query Cumulative translation totals <API Base URL>/reports/totals/translations Cumulative translation totals per language pairs <API Base URL>/reports/totals/translations/language-pairs Cumulative translation totals per users <API Base URL>/reports/totals/translations/users Detailed report of translations <API Base URL>/reports/translations
Important: You need to replace <API Base URL> with your actual Edge URL. - Click on OK. The Access Web content window will show up.
- Go to the Basic tab and enter your <API Key> under the User name field. Leave the Password field empty.
- Click on Connect. A new table will be created with the results of the query. You can remove or reorder columns as needed.
- Repeat the previous steps for each of the reporting queries you wish to run.
3. Adjusting the queries to a specific time frame
You can also adjust a query to a specific time frame. In this way, if you need to report on a monthly basis, for example, you can run a query per month, add a new date column to each table and then merge them in a single one.
To adjust a query to a specific time frame, follow the previous steps adding the following parameters to the queries:
Parameter | Description | Example |
fromTimestamp | The “from” date in the format yyyy-MM-dd | <API Base URL>/reports/totals/translations/language-pairs?fromTimestamp=yyyy-MM-dd |
toTimestamp | The “to” date in the format yyyy-MM-dd | <API Base URL>/api/v2/reports/totals/translations/users?toTimestamp=yyyy-MM-dd |
fromTimestamp & toTimestamp | Using both fromTimestamp and toTimestamp | <API Base URL>/reports/totals/translations/language-pairs?fromTimestamp=yyyy-MM-dd&toTimestamp=yyyy-MM-dd |
Examples:
Report Type | Period | Query |
Cumulative translation totals | From January 2022 to date | <API Base URL>/reports/totals/translations?fromTimestamp=2022-01-01 |
Cumulative translation totals per language pairs | Historical up to December 2021 | <API Base URL>/reports/totals/translations/language-pairs?toTimestamp=2021-12-31 |
Cumulative translation totals per users | March 2022 | <API Base URL>/reports/totals/translations/users?fromTimestamp=2022-03-01&toTimestamp=2022-03-31 |
Cumulative translation totals | January, February and March 2022 | <API Base URL>/reports/totals/translations?fromTimestamp=2022-01-01&toTimestamp=2022-03-31 |
4. Getting all the records from the detailed report
When running the “Detailed report of translations” query (<API Base URL>/reports/translations), only the first 25 records will be shown. The last column in the resulting table, named “totalItems”, indicates the total number of records in the database.
In order to get all the records from the database, you will need to use the “perPage” parameter and set it to the value of “totalItems”.
So, for example, if when you run
<API Base URL>/reports/translations
the value for totalItems = 1500, you will need to run the following query to get all the records:
<API Base URL>/reports/translations?perPage=1500