Remove Widget from Dashboard
client.EvaluationDashboards.Widgets.Remove(ctx, widgetID, body) error
DELETE/v5/evaluation-dashboards/{dashboard_id}/widgets/{widget_id}
Detach a widget from this dashboard without deleting the widget itself.
This removes the widget’s ID from the dashboard’s widget_order only; the
underlying widget entity and any computed widget results are left intact, so a widget
shared with other dashboards continues to work there. The widget must currently be in
this dashboard’s widget_order, otherwise a not-found error is returned. Responds
with 204 No Content on success.
Remove Widget from Dashboard
package main
import (
"context"
"github.com/scaleapi/sgp-dev-go"
"github.com/scaleapi/sgp-dev-go/option"
)
func main() {
client := sgpdev.NewClient(
option.WithAPIKey("My API Key"),
option.WithAccountID("My Account ID"),
)
err := client.EvaluationDashboards.Widgets.Remove(
context.TODO(),
"widget_id",
sgpdev.EvaluationDashboardWidgetRemoveParams{
DashboardID: "dashboard_id",
},
)
if err != nil {
panic(err.Error())
}
}