User role access
Retrieve selected role-access rows
POST
/a/UserRoleAccess_getRequestedDetails
Retrieve stored user-role access rows through the shared named-field detail helper.
When to use this endpoint
Use UserRoleAccess_getRequestedDetails to load the selected access fields for a role before rendering or comparing its access configuration.
Authentication and permissions
The authenticated context must contain pageUserRole_view or the global all role permission.
The permission check runs before explicit login validation.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fields | Native array | No | Any of id, roleID, field, and lastEdited. Omission requests all mapped fields. |
id / ids | Integer string or native array | No | Optional access-row ID filter, not a role filter. Scalars/array elements are integer-converted. |
roleID | Integer string or native array | No | Exact role-ID filter. This is the normal way to load a role’s access rows. |
field | String or native array | No | Case-insensitive exact access-field filter. |
lastEdited / order / advanceSearch | Shared mapped controls | No | Unix-time equality filter, mapped ordering, or advanced conditions. |
Example request
$rows = FM_api('UserRoleAccess_getRequestedDetails', [
'roleID' => '12',
'fields' => ['id', 'field', 'lastEdited'],
]);
Example response
[
{"id": "81", "field": "pageUserRoles_view", "lastEdited": "1970-01-01 00:00:00"}
]
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":"You do not have the correct permissions to view roles."} | The role-overview view permission is absent. |
[] | No access row matches the supplied filters. |
Runtime warning or type error | A shared array parameter has an unsupported scalar shape. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- No role/row ID is required. With no filters, every access row in the tenant is returned; there is no pagination or endpoint maximum.
lastEditedis stored as Unix seconds and rendered withFROM_UNIXTIME. Rows inserted by the replacement endpoints omit that column and normally display the epoch/default value.- The route does not join the access catalogue, validate field identifiers, or verify that
roleIDstill exists.
See it in Fieldmotion
CRM1
No direct CRM1 caller was found.
CRM2
Role list badges and the role Access page query by roleID; the detail page requests field values and compares them with the access catalogue.
Related endpoints
UserRoleAccess_getAccessListdescribes available catalogue fields.UserRoleAccess_updateAccessreplaces all rows for a role.