# Show report on your system

{% embed url="<https://www.youtube.com/watch?v=jNMQy3avxLE>" %}

### How to use the /identity/url endpoint

The first step is to get the API key as described on [this page](https://docs.powerembedded.com.br/documentacao-tecnica/api/automacoes-com-apis#obtendo-a-chave-de-api). To return the URL that you will use to access the reports portal transparently, without going through the login screen, use the POST /api/identity/url route.

```bash
curl -X 'POST' \
  'https://api.powerembedded.com.br/api/identity/url' \
  -H 'accept: application/json' \
  -H 'X-API-Key: HNhlHXAG1g21NyIsIkFwaUtleSI6Ik' \
  -H 'Content-Type: application/json' \
  -d '{
  "userEmail": "user@company.com",
}'
```

Below is the complete request body:

```json
{
  "userEmail": "string",
  "baseUrl": "string",
  "organizationId": "string",
  "reportId": "string",
  "hideMenu": bool,
  "hideNavbar": bool,
  "hideSidebar": bool,
  "embed": bool,
  "customFilters": [
    {
      "key": "string",
      "value": "string"
    }
  ]
}
```

### General parameters

* userEmail: the only mandatory field in the request. The email address of the person who is logged into your system must be entered. This user will be recorded in the audits and the reports that this user has access to will be shown on the screen. If the report has RLS, it will be applied automatically, using the filtering rules for the specified user.
* baseUrl: in this field, you must fill in the configured subdomain information. It is mandatory to provide this data so that the entire experience is personalized, including in the event of token expiry.
* When the organizationId and reportId parameters are NOT provided, the complete viewing portal will be rendered in your system, just as when you access it in traditional mode (without API), showing only the reports that the specified user has access to. The user will be free to browse the reports they have access to.

### Display control parameters

* hideMenu: hides the menu bar when the report is opened.
* hideNavbar: hides the navigation bar when the report is opened.
* hideSidebar: hides the sidebar on the navigation screen.
* embed: a shortcut parameter that can be used to set all the display properties above at once.
* customFilters: allows opening reports with filters already applied. More information [here](https://docs.powerembedded.com.br/documentacao-tecnica/api/filtragem-dinamica).

### Parameters for displaying just one report

If you want to display a specific report, you must provide both of the following parameters:

* organizationId: This is the unique identifier of your organization in the system, fixed and unchangeable. To obtain it, go to the "Settings" menu and copy the ID from the URL.
* reportId: This is the report ID, where each report has its own unique ID (it is the same reportId as the report in the Power BI service). To get the report ID, capture the ID from the URL on the report editing screen.

### API return

The API return is a single-use URL valid for 5 minutes.

```json
{
  "embedUrl": "https://demo.powerembedded.com.br/integration/tokenauth?token=c820f277-26ef-44f1-b8ff-46823fbf899d",
  "expiresAt": "2025-10-20T21:14:02.0429464Z"
}
```

If you have provided the other parameters, such as organizationId, reportId (to show only one report) and the display parameters, the request will have this format.

```bash
curl -X 'POST' \
  'https://api.powerembedded.com.br/api/identity/url' \
  -H 'accept: application/json' \
  -H 'X-API-Key: HNhlHXAG1g21NyIsIkFwaUtleSI6Ik' \
  -H 'Content-Type: application/json' \
  -d '{
  "userEmail": "user@company.com",
  "baseUrl": "bi.minhaempresa.com",
  "organizationId": "4b532635-a0c6-48ae-bea8-a5197c63f057",
  "reportId": "cb56555d-546c-40a2-b988-b1903cbbe39c"
}'
```

And the returned URL will look something like this.

```json
{
  "embedUrl": "https://demo.powerembedded.com.br/integration/tokenauth?token=6e87b8e8-f25a-43b4-a8f4-694b9a80a9f0&returnUrl=/Organization/public/6e87b8e8-f25a-43b4-a8f4-694b9a80a9f0",
  "expiresAt": "2025-10-20T21:15:03.492071Z"
}
```

With the generated URL, you just need to create an iframe using it as shown in the example below.

```html
<html>
    <iframe width="1200"
            height="800"
            src="https://demo.powerembedded.com.br/integration/tokenauth?token=
            6e87b8e8-f25a-43b4-a8f4-694b9a80a9f0&returnUrl=/Organization/public
            /6e87b8e8-f25a-43b4-a8f4-694b9a80a9f0">
    </iframe>
</html>
```

And with that, you can now show Power BI reports in your application, through Power Embedded, transparently and securely.

Since the URL token is for SINGLE use, this URL can only be accessed once. If you want to show the report again, you will have to execute this request again.

Since the token is for the specific user, when accessing a report, Power Embedded knows who the user is and performs the appropriate access permission validations, applying RLS rules if configured.

### **Documentation**

Complete API documentation:\
[Swagger UI (powerembedded.com.br)](https://api.powerembedded.com.br/index.html)

API demo page for embedding reports:\
[Demo – PowerPortal.IntegrationDemo (powerembedded.com.br)](https://dev.demoapi.powerembedded.com.br/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powerembedded.com.br/en/technical-documentation/api/show-report-on-your-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
