Integrating with PowerBI

PowerBI is a Business Intelligence and Data Visualisation product developed by Microsoft, that can be used to connect directly to Insights API data. This raw API data can then be transformed into focused reports and dashboards that provide real-time data on your Digital People and their critical metrics.

Creating API Key for Use in PowerBI

To connect your Insights API data to PowerBI, you will need API Key credentials which can be generated from the Digital DNA Studio as shown below.

Note: The key itself will only be accessible once, on creation. So ensure that it is saved in a secure location.

Create Insights API Key in DDNA Studio

Connecting to the Query Daily Events Endpoint

Using the API Key credentials created in DDNA Studio, you can connect to the Query Daily Events endpoint data, via PowerBI. This is the primary endpoint that returns daily log sessions events data.

  1. In a new Power BI window, navigate to the Data tab in the Home Menu.

  2. Select Get Data and click the Web option from the Common Data Sources dropdown menu.

  3. Switch to the Advanced menu.

  4. In the URL parts field, paste the following link: https://analytics-service.soulmachines.cloud/api/v1/analytics/query-daily-events?

Note: Ensure a ? character is entered at the end of the URL. This is so follow up parameters are appended correctly.

5. In the next URL parts field, enter the required logdate parameter, i.e. the date for which the daily events are being polled. The date must follow the yyyy-MM-dd format. An example logdate URL part: logdate=2022-07-08.

6. Specify optional projectId and/or session parameter key-value pairs, by selecting Add Part and following a similar Parameter Key = Value format. Include an & character at the end of every parameter URL part, except the last. This is to ensure parameters are separate but appended correctly to the URL.

Note: More detailed information on query parameter requirements, their descriptions and datatypes can be found at Insights API | Soul Machines Developer Docs.

7. In the HTTP request header parameters field, enter x-sm-apikey as the header value in the leftmost field. Copy and paste the secret API key you created in DDNA Studio in the rightmost field.

8. Click OK. Wait for the data preview to load in Power Query Editor.

9. Ensure the events column has been expanded in the Applied Steps menu. If not, navigate to the events column and click on the double-headed arrow next to the column name, to expand the events array into separate rows.

10. Once the data is transformed to your liking, select the Close and Apply dropdown and button in the top left menu, to apply and load the changes to the dataset.

You are ready to explore, visualise and query your Daily Events Insights API data in PowerBI.

Connecting to the Events Summary Endpoint

Using the API Key credentials created in DDNA Studio, you can connect to the Events Summary endpoint data, via PowerBI. This endpoint returns an organization-level events summary report between a specified start and end date.

  1. In a new Power BI window, navigate to the Data tab in the Home Menu.

  2. Select Get Data and click the Web option from the Common Data Sources dropdown menu.

  3. Switch to the Advanced menu.

  4. In the URL parts field, paste the following link: https://analytics-service.soulmachines.cloud/api/v1/analytics/events-summary?

5. In the next URL parts field, enter the required startdate parameter, i.e. the date from which the events summary data is being collected. The date must follow the yyyy-MM-dd format. An example startdate URL part: startdate=2022-06-30.

6. Specify optional enddate and/or projectId parameter key value pairs, by selecting Add Part and following a similar Parameter Key = Value format. Include an & character at the end of every parameter URL part, except the last. This is to ensure parameters are separate but appended correctly to the URL.

7. In the HTTP request header parameters field, enter x-sm-apikey as the header value in the leftmost field. Copy and paste the secret API key you created in DDNA Studio in the rightmost field.

8. Click OK. Wait for the data preview to load in Power Query Editor.

9. Ensure the projects column has been expanded in the Applied Steps menu. If not, navigate to the projects column and click on the double-headed arrow next to the column name, to expand the projects array into separate rows.

10. Once the data is transformed to your liking, select the Close and Apply dropdown and button in the top left menu, to apply and load the changes to the dataset.

You are ready to explore, visualize and query your Events Summary Insights API data in PowerBI.

Connecting to the Conversation Nodes Summary Endpoint

Using the API Key credentials created in DDNA Studio, you can connect to the Conversation Nodes Summary endpoint data, via PowerBI. This endpoint returns an organization-level conversation nodes summary report between a specified start and end date.

  1. In a new Power BI window, navigate to the Data tab in the Home Menu.

  2. Select Get Data and click the Web option from the Common Data Sources dropdown menu.

  3. Switch to the Advanced menu.

  4. In the URL parts field, paste the following link: https://analytics-service.soulmachines.cloud/api/v1/analytics/conversation-nodes-summary?

5. In the next URL parts field, enter the required startdate parameter, i.e. the date from which the conversation nodes summary data is being collected. The date must follow the yyyy-MM-dd format. An example startdate URL part: startdate=2022-07-08&.

6. In the next URL parts field, enter the required projectId parameter, i.e. the id of the project for which you want conversation nodes summary data for. Ensure the Parameter Key = Value format is followed.

7. Specify optional enddate, session, format, focusedName, parameter key value pairs, by selecting Add Part and following a similar Parameter Key = Value format. Include an & character at the end of every parameter URL part, except the last. This is to ensure parameters are separate but appended correctly to the URL.

8. In the HTTP request header parameters field, enter x-sm-apikey as the header value in the leftmost field. Copy and paste the secret API key you created in DDNA Studio in the rightmost field.

9. Click OK. Wait for the data preview to load in Power Query Editor.

10. Ensure the conversationNodes column has been expanded in the Applied Steps menu. If not, navigate to the conversationNodes column and click on the double headed arrow next to the column name, to expand the conversation nodes array into separate rows.

11. Once the data is transformed to your liking, select the Close and Apply dropdown and button in the top left menu, to apply and load the changes to the dataset.

You are ready to explore, visualize and query your Conversation Nodes Summary Insights API data in PowerBI.