Embed a dashboard
Use an approved origin and an authenticated viewer for embedded access.
Create a dashboard with the questions and shared filters you need. Verify each question under the intended viewer permissions. Ask the account team to approve the exact HTTPS origin of your portal.
curl
curl -X POST "$RDC_BASE_URL/reports/v1/dashboards" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "41800000-0000-4000-8000-000000000129",
"expectedRevision": 0,
"id": "management",
"questionIds": [
"revenue-by-product"
],
"filters": {
"period": "2026-10",
"companyId": null,
"department": null
}
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reports/v1/dashboards`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "41800000-0000-4000-8000-000000000129",
"expectedRevision": 0,
"id": "management",
"questionIds": [
"revenue-by-product"
],
"filters": {
"period": "2026-10",
"companyId": null,
"department": null
}
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/reports/v1/dashboards',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '41800000-0000-4000-8000-000000000129',
'expectedRevision': 0,
'id': 'management',
'questionIds': [
'revenue-by-product',
],
'filters': {
'period': '2026-10',
'companyId': None,
'department': None,
},
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "41800000-0000-4000-8000-000000000129",
"expectedRevision": 0,
"id": "management",
"questionIds": [
"revenue-by-product"
],
"filters": {
"period": "2026-10",
"companyId": null,
"department": null
}
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/reports/v1/dashboards');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/reports/v1/dashboards");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "41800000-0000-4000-8000-000000000129",
"expectedRevision": 0,
"id": "management",
"questionIds": [
"revenue-by-product"
],
"filters": {
"period": "2026-10",
"companyId": null,
"department": null
}
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "41800000-0000-4000-8000-000000000129",
"status": "accepted",
"aggregateRevision": 1
} curl
curl "$RDC_BASE_URL/reports/v1/dashboards/management" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reports/v1/dashboards/management`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/reports/v1/dashboards/management',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/reports/v1/dashboards/management');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/reports/v1/dashboards/management");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "management",
"revision": 1,
"questionIds": [
"revenue-by-product"
],
"filters": {
"period": "2026-10",
"companyId": null,
"department": null
},
"netRevenue": "202798.50",
"previousRevenue": "191902.50",
"grossProfit": "65248.00",
"overdueReceivables": "72063.00",
"openOrders": 2,
"target": "220000.00"
} curl
curl -X POST "$RDC_BASE_URL/reports/v1/dashboards/management/embeds" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "41800000-0000-4000-8000-000000000135",
"expectedRevision": 1,
"id": "management-portal",
"allowedOrigin": "https://portal.example"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reports/v1/dashboards/management/embeds`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "41800000-0000-4000-8000-000000000135",
"expectedRevision": 1,
"id": "management-portal",
"allowedOrigin": "https://portal.example"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/reports/v1/dashboards/management/embeds',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '41800000-0000-4000-8000-000000000135',
'expectedRevision': 1,
'id': 'management-portal',
'allowedOrigin': 'https://portal.example',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "41800000-0000-4000-8000-000000000135",
"expectedRevision": 1,
"id": "management-portal",
"allowedOrigin": "https://portal.example"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/reports/v1/dashboards/management/embeds');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/reports/v1/dashboards/management/embeds");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "41800000-0000-4000-8000-000000000135",
"expectedRevision": 1,
"id": "management-portal",
"allowedOrigin": "https://portal.example"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "41800000-0000-4000-8000-000000000135",
"status": "accepted",
"aggregateRevision": 1
} The embed operation uses the current dashboard revision and returns an operation receipt. After completion, read the embed by the id you supplied. allowedOrigin matches the approved origin exactly, including any non-default port.
curl
curl "$RDC_BASE_URL/reports/v1/embeds/management-portal" \
-H "Authorization: Bearer $RDC_TOKEN" JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/reports/v1/embeds/management-portal`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
},
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'GET',
f'{os.environ["RDC_BASE_URL"]}/reports/v1/embeds/management-portal',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
)
result = response.json() PHP
<?php
$curl = curl_init(getenv('RDC_BASE_URL') . '/reports/v1/embeds/management-portal');
curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RDC_TOKEN'),
],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl); C#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/reports/v1/embeds/management-portal");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"id": "management-portal",
"revision": 1,
"dashboardId": "management",
"allowedOrigin": "https://portal.example",
"path": "/reports/embed/management-portal"
} Resolve path against the application address issued with your account, not against this documentation host. The viewer signs in with the configured account session. Never append RDC_TOKEN or the client secret to the iframe URL. The account team configures framing for the approved portal; embed_origin_forbidden is not bypassed by relaxing browser security.