Reporting dashboards and targets
Delete a dashboard widget
/a/ReportDashboard_delete
Soft-delete one stored report widget without deleting its dashboard group.
When to use this endpoint
Select the saved widget or group from its corresponding list before deleting. Deletion retains records but removes them from active reads and reports. There is no reporting restore endpoint.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. All lookups and writes are tenant-local.
The group owner or an effective edit-share recipient may create/edit/delete widgets or save layout/date filters. A view share alone is read-only. None disables its share array; otherwise string user IDs or All grant that share. No reporting-feature or additional CRM2 page-role check is applied.
For signed form requests, sign numeric scalar values as strings, including values inside native nested arrays. Send JSON text only for parameters explicitly accepting JSON strings; see Getting started.
These reporting handlers require tenant schema upgrade 794 before deployment. No request path creates or repairs schema.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer-compatible | Yes | Positive integer ID in the authenticated tenant. Malformed, fractional, zero, or negative values are rejected; deleted records are unavailable. |
Example request
$result = FM_api('ReportDashboard_delete', ['id' => '71']);
Example response
{"ok":"1"}
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error":"missing or invalid parameter: id"} | Required id is absent or invalid. |
{"error":"no permission to access api"} | The group is not readable/editable, or the operation requires ownership and the caller is not its owner. |
{"error":"reporting write failed"} | A database write failed. Transactional operations roll back instead of returning success. |
{"error":"reporting deletion could not be recorded"} | The deletion audit failed; the entire soft deletion is rolled back. |
{"error":"report is not existing."} | The widget does not exist or is deleted. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- An absent or deleted widget returns
report is not existing.; zero/invalid IDs are rejected. - Deletion retains the widget with
deleted=1and Unixddate. Deleted widgets are excluded from lists, details, rendering, and further writes. No reporting restore endpoint exists.
Side effects
- Soft-deletes and advances the widget edit timestamp, invalidates its cache, and writes a tenant deletion audit with
ReportDashboard_delete. The row and audit commit together; audit failure rolls back. No group edit, activity history, or notification occurs.
See it in Fieldmotion
CRM1
Remove a widget from the report dashboard; filter Network for ReportDashboard_delete.
CRM2
Remove a widget from classic or new Report Dashboard; the UI sends this endpoint. Filter browser Network requests for ReportDashboard_delete.
Related endpoints
ReportDashboardGroups_listfinds groups visible to the current user.ReportDashboards_listloads stored widget configuration.ReportDashboardGroup_setMetaedits group metadata and sharing.