Get Embeddable URL
Get an embeddable customer dashboard
client.v1.dashboards.getEmbeddableURL(DashboardGetEmbeddableURLParamsbody, RequestOptionsoptions?): dataDataDashboardGetEmbeddableURLResponse
post/v1/dashboards/getEmbeddableUrl
Retrieve an embeddable dashboard url for a customer. The dashboard can be embedded using an iframe in a website. This will show information such as usage data and customer invoices.
Parameters
bodycustomer_idstringdashboardunionbm_group_key_overridesarraycolor_overridesarraydashboard_optionsarrayDashboardGetEmbeddableURLParams
Returns
DashboardGetEmbeddableURLResponse
import Metronome from '@metronome/sdk';
const client = new Metronome({
bearerToken: 'My Bearer Token',
});
const response = await client.v1.dashboards.getEmbeddableURL({
customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
dashboard: 'invoices',
bm_group_key_overrides: [
{
group_key_name: 'tenant_id',
display_name: 'Org ID',
value_display_names: { '48ecb18f358f': 'Cluster EU', e358f3ce242d: 'Cluster APAC' },
},
],
color_overrides: [{ name: 'Gray_dark', value: '#ff0000' }],
dashboard_options: [
{ key: 'show_zero_usage_line_items', value: 'false' },
{ key: 'hide_voided_invoices', value: 'true' },
],
});
console.log(response.data);
200 Example
{
"data": {
"url": "url"
}
}