import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const dashboard = await client.applications.dashboards.retrieve('application_spec_id', 'top_level_dashboard');
console.log(dashboard.id);
{
"id": "<string>",
"title": "<string>",
"visualizations": [
{
"id": "<string>",
"title": "<string>",
"type": "scalar",
"metric_id": "total_requests",
"metadata": {
"is_variant_specific_metric": false,
"label_title_map": {},
"label_color_map": {}
}
}
]
}
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const dashboard = await client.applications.dashboards.retrieve('application_spec_id', 'top_level_dashboard');
console.log(dashboard.id);
{
"id": "<string>",
"title": "<string>",
"visualizations": [
{
"id": "<string>",
"title": "<string>",
"type": "scalar",
"metric_id": "total_requests",
"metadata": {
"is_variant_specific_metric": false,
"label_title_map": {},
"label_color_map": {}
}
}
]
}
top_level_dashboard
, engagements_dashboard
, executions_dashboard
, variant_overview_dashboard
Successful Response
The response is of type object
.