Permanently removes a dashboard widget owned by the authenticated user.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/dashboard/widget/delete.do
Permanently removes a dashboard widget owned by the authenticated user. The widget is identified by its unique numeric ID. If the widget ID is null or missing, the endpoint returns HTTP 400 Bad Request. On success, the widget is deleted from the user's dashboard and a JSON response with success status is returned.
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/dashboard/widget/delete.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["id"] = "501" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());