@vizzly/api-client
v0.0.96
Published
## Create a parent dashboard
Downloads
9,332
Readme
Vizzly API client
Create a parent dashboard
import { VizzlyApi, Authentication } from '@vizzly/api-client';
export const createParentDashboard = async () => {
const auth = new Authentication({projectApiKey: process.env['VIZZLY_PROJECT_API_KEY']});
const vizzlyApi = new VizzlyApi(auth);
const response = await vizzlyApi.createParentDashboard({
name: 'My new parent dashboard'
});
if(response.status === 200) {
const { dashboard } = response.body;
// dashboard.id
// dashboard.name
} else {
throw "Failed to create a parent dashboard.";
}
};
