Reporting dashboards and targets
Remove a direct dashboard share
/a/ReportDashboardGroup_removeShared
Remove all direct current-user entries from both dashboard sharing arrays.
When to use this endpoint
Load the saved dashboard/group configuration first, then send this edit from its settings or layout controls. Re-read the configuration after an uncertain write: the handler reports validation, permission, lookup, and write failures as application errors.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. All lookups and writes are tenant-local.
The caller must be able to read the group; only their own direct share entries are removed. 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('ReportDashboardGroup_removeShared', ['id'=> '12']);
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. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- The group must be active and readable. Every direct current-user entry is removed from both sharedUser and sharedUserEdit, including duplicates and historical numeric IDs.
- Ownership and global All tokens are preserved: success can leave the group visible/editable through those grants. No matching direct entry succeeds unchanged.
Side effects
- A changed metadata value is saved transactionally, advances last_edited, and invalidates the group cache. No activity or notification occurs.
See it in Fieldmotion
CRM1
No direct caller was found.
CRM2
The classic dashboard-group list’s Remove Shared action calls this endpoint. Filter browser Network requests for ReportDashboardGroup_removeShared.
Related endpoints
ReportDashboardGroups_listfinds groups visible to the current user.ReportDashboards_listloads stored widget configuration.ReportDashboardGroup_setMetaedits group metadata and sharing.