Delete

Deleting a Dashboard

Initialization

To delete a dashboard, you must first initiate the Vizzly SDK.

Initializing the Vizzly SDK

Ensure you have loaded the Vizzly package by following the prerequisite steps in our initializing guide.

If needed, you will also then be able to fetch the Vizzly instance using the following code.

const vizzly = Vizzly.use();

Usage

Once the SDK has been initiated, you can call the update function and pass in the deleted: true parameter

const doDeleteDashboard = async (dashboardIdToDelete: string) => {
  const vizzly = Vizzly.use();
 
  await vizzly.updateDashboard({
    // Provide the ID of the dashboard to delete.
    dashboardId: dashboardIdToUpdate,
 
    // Delete the dashboard by updating the `deleted` property.
    deleted: true
  });
};