---
title: "Connect Pigment with PowerBI"
slug: "connect-powerbi"
description: "Learn to load Pigment data in PowerBI using the API. Follow simple steps to set up API credentials and import data seamlessly."
tags: ["Data Import", "Importing Exporting Data", "Pigment API", "PowerBI Integration"]
updated: 2025-08-29T09:47:29Z
published: 2025-08-29T09:47:29Z
---

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

# Connect Pigment with PowerBI

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/image(31).png)

This article explains how to load Pigment data in Microsoft PowerBI, specifically how to easily use Pigment’s API with the Get data from Web feature of PowerBI.

Use the Pigment API to retrieve Pigment data, this can be queried directly from PowerBI. Follow the steps below to quickly set up the API.

## Step 1 - Prepare API credentials

To prepare the API credentials:

1. Go to **Workspace Settings.**
2. Select **API Keys**.
3. Select **+ Create API key** in the top-right corner of the page to create a new key.
4. Enter an API key name, expiration date and toggle **Key type** to **Export.**

Save the generated key as you will need it to authenticate the data request from PowerBI.

The key tells Pigment which Workspace is targeted, and if the request is made by an authorized user with the appropriate security permissions.

> ℹ️ **Note**
> 
> Only Admins can access the API Keys page.

## Step 2 - Find the Block or View ID you want to load

To configure the API endpoints, we need to identify the View ID.

You will typically find this element in the URL of the page. For example, when you open a View in Pigment, you will see this type of URL in your browser:

```plaintext
https://pigment.app/w/company-name/application/023a8e40-a9a0-4daf-bced-eabc08af93ce/tables/933e36d0-d032-45dd-affc-b7412abd1beb?viewId=f1f3edd7-e639-4701-9fce-fe7f16fb4379&displayMode=Grid
```

The part after `viewId=` is the ID of the currently displayed View (it stops before the `&amp;`).

In the example above, the View ID is:

- View ID: `f1f3edd7-e639-4701-9fce-fe7f16fb4379`

Take note of the View ID.

## Step 3 - Prepare the API endpoints

> [!WARNING]
> ⚠️ Important
> 
> Block exports require POST requests and aren’t supported in PowerBI. You must use View exports instead.

### Views

Replace `{viewId}` with the View ID you copied in the previous step.

`https://pigment.app/api/export/view/{viewId}`

Using our example, it looks like this:

`https://pigment.app/api/export/view/f1f3edd7-e639-4701-9fce-fe7f16fb4379`

For more details, refer to the complete documentation on [View exports](/v1/docs/import-export-data).

> ℹ️ **Note**
> 
> For more details, refer to the complete documentation on Export API endpoints for [Blocks](/v1/docs/raw-data-block) and [Views](/v1/docs/export-data-with-apis).

## Step 4 - Load Pigment data from PowerBI

Now that you have prepared everything, it’s very easy to configure the import in PowerBI (desktop version).

1. From the desktop PowerBI application, select **Get data**.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/22eeed98-fbb1-47e7-a110-e2aa98e178e9.png)

1. Select **Other,**then choose**Web**.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/f5abe705-31a4-471d-abb5-513a27a166ad.png)

1. Select **Advanced** mode and add the details below.
  1. In **URL parts**, add either the full API endpoint or split it like in the example below to make it easier to update the ID later.
  2. In **HTTP request header parameters,** add the following information:

- Header name: `Authorization`

- Header value: `Bearer {apiKey}`

Replace `{apiKey}` with the key you generated in step 1 and ensure there's exactly one space after **Bearer** and the **key value** like below.

![](https://cdn.document360.io/e47cfe35-dc28-40c7-a083-6cf003073d8e/Images/Documentation/02ff5b61-063c-4e4f-975e-08733e4a8ccc.png)

1. Select**OK**, then follow the usual import steps from PowerBI.
