> ## Documentation Index
> Fetch the complete documentation index at: https://syteca.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Power BI Example

> End-to-end use case — import Syteca monitoring data into Microsoft Power BI report templates using the Syteca API Data Connector. Includes example report views for idle time, productivity, and application usage.

This use case walks through importing Syteca monitoring data into Microsoft Power BI report templates using the Syteca API Data Connector. The result is a set of Power BI dashboards covering idle time, work time, user productivity, interactive monitoring, and application usage — driven by live API calls into the Data Connector.

<Warning>
  **NOT AVAILABLE IN SAAS.** The Data Connector is on-premises only.
</Warning>

## Before you start

| Prerequisite                                                                  | Where                                                                                                                      |
| ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Data Connector installed and registered**                                   | [Install the Data Connector](/docs/api/data-connector/overview) → [Register in the Management Tool](/docs/api/data-connector/manage) |
| **Power BI Desktop** with your report template open                           | Power BI Desktop installation                                                                                              |
| **Network reachability** between Power BI Desktop and the Data Connector host | TCP/HTTPS to the configured hostname                                                                                       |
| **Active API key** from the Management Tool user that will run the reports    | [Manage → Get an API key](/docs/api/data-connector/manage#get-an-api-key)                                                       |

## Import Syteca data into a Power BI report template

<Steps>
  <Step title="Open the report template in Power BI Desktop">
    Open the required Syteca Power BI report template (`.pbit` or `.pbix` file) in **Power BI Desktop**.
  </Step>

  <Step title="Copy the API key from the Management Tool">
    Open the Syteca Management Tool. Click the button in the top right where your user name is displayed.

    On the **Manage Account** page, click the **Copy** icon next to the **Active API Key** field to copy the key to your clipboard.

    <Warning>
      Treat the API key like a password — anyone with it can read every monitoring record visible to your user account. Don't paste it into shared chats or commit it to source control.
    </Warning>
  </Step>

  <Step title="Open Edit Parameters in Power BI">
    In the Power BI report template, click **Transform data → Edit parameters** to open the **Edit Parameters** dialog.
  </Step>

  <Step title="Set the ApiKey and ApiUrl">
    * **`ApiKey`** — paste the value you copied from the Management Tool.
    * **`ApiUrl`** — set to the Data Connector URL in the form `https://<hostname>/ekranapi` (where `<hostname>` matches the **Issued To** field of the HTTPS certificate you set up during [installation](/docs/api/data-connector/install#3-set-up-an-https-certificate)).

    <Note>
      Include the `/ekranapi` path suffix — without it, Power BI calls will return 404.
    </Note>
  </Step>

  <Step title="(Optional) Set the time range">
    Change the **`From`** and **`To`** fields if you want to constrain the date range. These parameters drive the [User Productivity](/docs/api/data-connector/endpoints/get-user-productivity) dataset specifically — other datasets in the template may use their own ranges.
  </Step>

  <Step title="Apply changes">
    Click **OK** in the Edit Parameters dialog, then click **Apply changes** in the Power BI ribbon. Power BI calls each endpoint in turn and loads the data into the report's tables.

    Wait until all data is imported — large date ranges or busy Syteca deployments may take a few minutes. The report visuals populate automatically once data load completes.
  </Step>
</Steps>

<Frame caption="The Edit Parameters dialog in Power BI Desktop — set the ApiKey from the Management Tool and ApiUrl pointing to your Data Connector hostname.">
  <img src="https://mintcdn.com/syteca/FKrkO8bEqEQ6WSgs/images/api/data-connector/power-bi-edit-parameters.png?fit=max&auto=format&n=FKrkO8bEqEQ6WSgs&q=85&s=2e812e9548a7011638c733886a6a6e62" alt="Power BI Desktop Edit Parameters dialog showing ApiKey, ApiUrl, From, and To fields for the Syteca Data Connector report template" width="916" height="512" data-path="images/api/data-connector/power-bi-edit-parameters.png" />
</Frame>

## Example reports

Power BI templates from Syteca typically include the following reports:

### Idle Time and Work Time

<Frame caption="Idle Time and Work Time — per-user breakdown of productive vs idle hours, sourced from POST /sessions and the productivity time field.">
  <img src="https://mintcdn.com/syteca/FKrkO8bEqEQ6WSgs/images/api/data-connector/power-bi-idle-time-work-time.png?fit=max&auto=format&n=FKrkO8bEqEQ6WSgs&q=85&s=18eb8462e1f25b53fdaf8dca29104aae" alt="Power BI report showing per-user idle time vs work time breakdown with stacked bars across multiple users" width="1427" height="849" data-path="images/api/data-connector/power-bi-idle-time-work-time.png" />
</Frame>

**Endpoints used:** [`POST /sessions`](/docs/api/data-connector/endpoints/post-sessions) (for `duration`, `idleTime`, `productivityTime` per session).

### Interactive Monitoring

A timeline-style view of user activity events, blended with alert events for context. Useful for incident review where you need to see "what was this user doing when the alert fired?"

**Endpoints used:** [`POST /sessions`](/docs/api/data-connector/endpoints/post-sessions) + [`GET /alerts`](/docs/api/data-connector/endpoints/get-alerts).

### User Productivity

<Frame caption="User Productivity — heatmap of active minutes per user across hours of the day, sourced from GET /user/getproductivity.">
  <img src="https://mintcdn.com/syteca/FKrkO8bEqEQ6WSgs/images/api/data-connector/power-bi-user-productivity.png?fit=max&auto=format&n=FKrkO8bEqEQ6WSgs&q=85&s=28a3f5981b34ccd677dcea2948f75702" alt="Power BI heatmap showing user productivity across hours of the day with color intensity representing active time" width="1359" height="811" data-path="images/api/data-connector/power-bi-user-productivity.png" />
</Frame>

**Endpoints used:** [`GET /user/getproductivity`](/docs/api/data-connector/endpoints/get-user-productivity) (for the `(userName, timeOfDay, totalMinutes)` triples).

### Application Usage

<Frame caption="Application Usage — top applications by total time, sourced from GET /statistics/getapp.">
  <img src="https://mintcdn.com/syteca/FKrkO8bEqEQ6WSgs/images/api/data-connector/power-bi-application-usage.png?fit=max&auto=format&n=FKrkO8bEqEQ6WSgs&q=85&s=6e4297716b958d22e5191743e413b316" alt="Power BI report showing top applications ranked by total time spent across all monitored users with date and user filters" width="1085" height="639" data-path="images/api/data-connector/power-bi-application-usage.png" />
</Frame>

**Endpoints used:** [`GET /statistics/getapp`](/docs/api/data-connector/endpoints/get-application-statistics) (and optionally [`GET /statistics/geturl`](/docs/api/data-connector/endpoints/get-url-statistics) for a URL-equivalent report).

## Building your own Power BI reports

The reports above are starting templates — you can build any Power BI visualization that fits the API's data shape:

| You want to visualize                         | Endpoint to call                                                                                              |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| Sessions per Client / per user / per day      | [`POST /sessions`](/docs/api/data-connector/endpoints/post-sessions)                                               |
| Active time per user, per hour of day         | [`GET /user/getproductivity`](/docs/api/data-connector/endpoints/get-user-productivity)                            |
| Time spent in each application, per session   | [`GET /statistics/getapp`](/docs/api/data-connector/endpoints/get-application-statistics)                          |
| Time spent on each website, per session       | [`GET /statistics/geturl`](/docs/api/data-connector/endpoints/get-url-statistics)                                  |
| Alert events with deep-link to Session Viewer | [`GET /alerts`](/docs/api/data-connector/endpoints/get-alerts)                                                     |
| Endpoint Access Control audit trail           | [`GET /AccessRequests/GetEndpointAccessRequests`](/docs/api/data-connector/endpoints/get-endpoint-access-requests) |

In Power BI, use **Get data → Web** with the ApiUrl and the ApiKey header — Power BI handles the JSON parsing automatically, exposing the response fields as Power Query columns.

## Refreshing the data

Power BI reports built on the Data Connector follow Power BI's standard refresh model:

* **Manual refresh in Desktop**: click **Refresh** in the Home ribbon to re-call every endpoint and update visuals.
* **Scheduled refresh in the Power BI service**: publish the report to Power BI service and configure a scheduled refresh. The Data Connector must be reachable from the Power BI service host — for on-premises deployments, that typically means an **On-premises data gateway** between Power BI service and your network.

## Fix an SSL/TLS certificate error

<Warning>
  **NOT AVAILABLE IN SAAS.**
</Warning>

If Power BI shows an SSL/TLS certificate error when connecting to the Data Connector, check the following:

<Steps>
  <Step title="Use the certificate's hostname, not an IP address">
    In the Power BI report template, click **Transform data > Edit parameters**. If **ApiUrl** uses the machine's IP address, replace it with its hostname instead, for example `https://<hostname>/ekranapi`.

    <Note>
      The hostname in **ApiUrl** must exactly match the **Issued To** name on the [HTTPS certificate](/docs/api/data-connector/install#3-set-up-an-https-certificate) — not any other valid hostname for the machine.
    </Note>
  </Step>

  <Step title="Confirm the certificate is trusted">
    Confirm the Management Tool machine has a valid SSL certificate, and that the same certificate is added to the Trusted Root Certificate store on the machine running Power BI Desktop.
  </Step>

  <Step title="Adjust Power BI's security and privacy settings">
    In Power BI Desktop, go to **File > Options and settings > Options**:

    * **Security** page — set **Certificate Revocation** to **None**, and **Data Extensions** to **Allow any extension to load without validation or warning**.
    * **Privacy** page — set **Privacy Levels** to **Always ignore Privacy Level settings**.
  </Step>
</Steps>

## Related

<CardGroup cols={2}>
  <Card title="API reference" icon="square-code" href="/docs/api/data-connector/api-reference">
    Authentication, base URL, time conventions, all endpoints, status codes.
  </Card>

  <Card title="Install the Data Connector" icon="download" href="/docs/api/data-connector/overview">
    Prerequisites and MSI install before you can connect Power BI.
  </Card>

  <Card title="Manage the Data Connector" icon="settings" href="/docs/api/data-connector/manage">
    Get your API key from the Manage Account page.
  </Card>

  <Card title="Overview" icon="plug-2" href="/docs/api/data-connector/overview">
    Conceptual overview of the Data Connector and its use cases.
  </Card>
</CardGroup>
