🧩ISV for Report Embedding

This guide covers embedding a DataCentral report into a third-party app or website using the REST API and an encrypted key.

Content

Step 1: Setting up the API request

Step 2: Constructing the POST payload

Step 3: Sending the Request

Step 4: Embedding the Power BI Report

Security and Best Practices

Additional Notes

Examples

Overview

What steps are needed to embed a report from a DataCentral tenant into a 3rd party application or website using the REST API endpoint provided by the DataCentral SaaS solution. This will involve sending a POST request to the API to receive an encrypted key, which will then be used to embed the report.

Step 1: Setting up the API request

  • Endpoint: https://apim.datacentral.ai/dcai/encrypter

  • Method: POST

  • Required Querystring Parameter: key=fd049aba32334c95a761abfd8b65723d

Step 2: Constructing the POST payload

Prepare a JSON payload with the following structure:

  • Replace <USER_ID> with the customer's unique user ID (Kennitala) that will be the value of the DAX UserName() function.

  • Set <REPORT_ID> should uniquely identify a report on website.

  • Set <OPTIONAL_EXPIRATION_DATETIME> with the desired expiration time for the session, example date-time format: "2025-12-18T20:22".

  • The roleNames is a comma separated list of role names to be applied to the model.

The passPhrase can be found on your tenant under Settings-Security, see screenshot below:

Step 3: Sending the request

  • Use a server-side method to send the POST request to ensure security.

  • The request should return a JSON object. If successful, you will receive a response in the following format:

  • Extract <ENCRYPTED_KEY> from the response for embedding the report.

Step 4: Embedding the Power BI Report

  • Replace <ENCRYPTED_KEY> with the key received from the API response.

  • Embed this URL in an iframe on the desired page of our website.

Note in this example the value 1 is the report ID being displayed.

See following picture.

Security and best practices

  • Ensure all API calls are made securely from the server-side to protect the API key and other sensitive data.

  • Validate and sanitize all inputs to prevent security vulnerabilities.

  • Test the implementation thoroughly to ensure the embedded report functions correctly and adheres to the specified role and expiration constraints.

Additional notes

  • The <USER_ID> should uniquely identify a customer on website.

  • The <REPORT_ID> should uniquely identify a report on website.

  • The roleNames array can contain multiple roles if necessary. In this setup, it contains a single role: KennitalaRLS.

  • The <OPTIONAL_EXPIRATION_DATETIME> parameter is optional but recommended to align with the duration of a login session for security reasons.

Examples

Example in Python

Example in Powershell

Example in Postman / Insomnia

Last updated