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 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

ParameterTypeRequiredDescription
idInteger-compatibleYesPositive integer ID in the authenticated tenant. Malformed, fractional, zero, or negative values are rejected; deleted records are unavailable.
valStringYesTrimmed, nonblank replacement name, limited to 100 characters.

Example request

$result = FM_api('ReportDashboard_setName', ['id'=> '71','val'=>'Quarterly sales']);

Example response

{"ok":"1"}

Errors and unusual responses

ResponseCondition
{"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":"missing or invalid parameter: val"}Required val is absent or invalid or blank.
{"error":"parameter too long: val. max length 100 characters"}The trimmed name exceeds the 100-character limit.
{"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":"report is not existing."}The widget is missing or deleted.
{"ok":"1","warning":"no change required"}Normalized input equals the stored value; no write occurs.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Names are trimmed, nonblank, and maximum 100 characters; duplicate names are allowed.
  • No-change detection compares unescaped text, including quotes/backslashes, with the saved name.

Side effects

  • Checks edit permission and saves the value with the Unix edit timestamp in a transaction, invalidating the widget cache. On failure no change is committed; no activity history, notification, or group timestamp update occurs.

See it in Fieldmotion

CRM1

Edit the widget’s title in the dashboard editor and inspect ReportDashboard_setName. Filter browser Network requests for ReportDashboard_setName.

CRM2

The dashboard widget editor submits ReportDashboard_setName. Filter browser Network requests for ReportDashboard_setName.

Related endpoints