curl --request POST \
--url https://hiimpria.ai/api/user/agents/connect/powerbi/key \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"tenant_id": "<string>",
"connections": [
{
"name": "jobcost",
"client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Riverside job cost",
"client_secret": "<string>"
}
]
}
'import requests
url = "https://hiimpria.ai/api/user/agents/connect/powerbi/key"
payload = {
"tenant_id": "<string>",
"connections": [
{
"name": "jobcost",
"client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Riverside job cost",
"client_secret": "<string>"
}
]
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenant_id: '<string>',
connections: [
{
name: 'jobcost',
client_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
group_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
dataset_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: 'Riverside job cost',
client_secret: '<string>'
}
]
})
};
fetch('https://hiimpria.ai/api/user/agents/connect/powerbi/key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hiimpria.ai/api/user/agents/connect/powerbi/key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tenant_id' => '<string>',
'connections' => [
[
'name' => 'jobcost',
'client_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'group_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'dataset_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => 'Riverside job cost',
'client_secret' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hiimpria.ai/api/user/agents/connect/powerbi/key"
payload := strings.NewReader("{\n \"tenant_id\": \"<string>\",\n \"connections\": [\n {\n \"name\": \"jobcost\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"Riverside job cost\",\n \"client_secret\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://hiimpria.ai/api/user/agents/connect/powerbi/key")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tenant_id\": \"<string>\",\n \"connections\": [\n {\n \"name\": \"jobcost\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"Riverside job cost\",\n \"client_secret\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/agents/connect/powerbi/key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenant_id\": \"<string>\",\n \"connections\": [\n {\n \"name\": \"jobcost\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"Riverside job cost\",\n \"client_secret\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"connected": true,
"results": [
{
"name": "<string>",
"ok": true,
"datasetName": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
]
}Connect this Digital Twin to Power BI (read-only)
Saves the Azure tenant id and one or more Power BI connections. Each connection is an Azure app (service principal) with Build permission on one dataset. Every connection is verified before anything is saved: a client-credentials token, then EVALUATE ROW("ok", 1) through executeQueries. The response reports each connection’s outcome. On success the configuration is stored encrypted and the twin’s Power BI tool is switched on for its signed-in members. Leave client_secret empty to keep a connection’s stored secret (same tenant, name, client id, workspace and dataset). The whole list replaces the previous one. Instance administrators only; at most 5 attempts per 10 minutes per twin. Nothing is ever written to Power BI: the server’s client can only make four requests (the token mint, executeQueries, GET dataset, GET refreshes?$top=1) and refuses any other method or path before it is sent.
curl --request POST \
--url https://hiimpria.ai/api/user/agents/connect/powerbi/key \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"tenant_id": "<string>",
"connections": [
{
"name": "jobcost",
"client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Riverside job cost",
"client_secret": "<string>"
}
]
}
'import requests
url = "https://hiimpria.ai/api/user/agents/connect/powerbi/key"
payload = {
"tenant_id": "<string>",
"connections": [
{
"name": "jobcost",
"client_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "Riverside job cost",
"client_secret": "<string>"
}
]
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenant_id: '<string>',
connections: [
{
name: 'jobcost',
client_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
group_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
dataset_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
label: 'Riverside job cost',
client_secret: '<string>'
}
]
})
};
fetch('https://hiimpria.ai/api/user/agents/connect/powerbi/key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hiimpria.ai/api/user/agents/connect/powerbi/key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tenant_id' => '<string>',
'connections' => [
[
'name' => 'jobcost',
'client_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'group_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'dataset_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'label' => 'Riverside job cost',
'client_secret' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hiimpria.ai/api/user/agents/connect/powerbi/key"
payload := strings.NewReader("{\n \"tenant_id\": \"<string>\",\n \"connections\": [\n {\n \"name\": \"jobcost\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"Riverside job cost\",\n \"client_secret\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://hiimpria.ai/api/user/agents/connect/powerbi/key")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tenant_id\": \"<string>\",\n \"connections\": [\n {\n \"name\": \"jobcost\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"Riverside job cost\",\n \"client_secret\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/agents/connect/powerbi/key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenant_id\": \"<string>\",\n \"connections\": [\n {\n \"name\": \"jobcost\",\n \"client_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dataset_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"label\": \"Riverside job cost\",\n \"client_secret\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"connected": true,
"results": [
{
"name": "<string>",
"ok": true,
"datasetName": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
]
}Authorizations
JWT token passed in x-access-token header
Body
Was this page helpful?