When to use this endpoint

Use the dashboard-group list to select a source and choose a new name. Refresh the group list after copying: the returned ID is the destination group ID.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. All lookups and writes are tenant-local.

Only owned or effectively view/edit-shared groups and their active widgets can be read. A group can be copied when it is readable. 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.
nameStringYesTrimmed, nonblank name, limited to 100 characters by Core_maxLengthError.
isNewInteger-compatibleNoOptional dashboard-mode override. Integer 1 sets the new marker; other supplied values remove it. Omission preserves the source marker.

Example request

$result = FM_api('ReportDashboardGroup_copy', ['id'=> '12','name'=>'Sales copy','isNew'=> '1']);

Example response

{"ok":"1","id":13}

id is the new dashboard-group ID, including when copying an empty group.

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: name"}Required name is absent or invalid or blank.
{"error":"parameter too long: name. 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.

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 source must be an active readable group. The new group belongs to the caller.
  • Widget name, API, grid, filter, and notes are copied with new IDs/timestamps; soft-deleted widgets are excluded.
  • Non-sharing group metadata, including display settings and dashboard-mode marker, is preserved. sharedUser/sharedUserEdit are removed. A supplied isNew overrides the copied marker: integer 1 sets it, other values remove it.
  • Group and widget inserts commit together. A failed insert returns an error and rolls back the whole copy.

Side effects

  • Creates a new owned group and its active widget copies, invalidating both caches. No source change, sharing transfer, activity history, or notification occurs.

See it in Fieldmotion

CRM1

No direct copy caller was found.

CRM2

Use Copy on the classic or new dashboard-group list. The UI refreshes the list instead of treating the returned ID as a group ID. Filter browser Network requests for ReportDashboardGroup_copy.

Related endpoints