Saved views and configuration
Retrieve mapped filter preset details
/a/UserFilter_getRequestedDetails
Fetch selected preset fields by ID or mapped-field filters.
When to use this endpoint
Use when CRM2 bulk privacy editing needs the selected visible presets’ current values. This applies the same own-or-public visibility rule as the preset lists.
Authentication and permissions
Authenticate with signed API-key fields or a logged-in CRM session. A tenant login is required.
Reads expose only filters owned by the current user or marked public=1. Writes require ownership or client-administrator permission; another user’s public filter is not editable merely because it is visible. Assigning or transferring ownership to another active tenant user requires client-administrator permission.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id / ids | Integer string or native array | No | Optional physical-row selectors; id takes precedence. With no selector the reader can return all tenant presets. |
fields | Native array of strings | No | Defaults to all mapped fields: id (integer), cDate (stored datetime), userID (integer owner), name (text, max 182 characters), data (JSON), public (integer), pageType (text), meta (JSON). Unknown names ignored; id always returned. JSON-string field lists are not decoded. |
Mapped field filters | Scalar or native array | No | Any mapped field except id may filter rows. Use wire keys such as userID/pageType rather than user_id/page_type. |
order | Field string or native array | No | Mapped name(s) ascending, or entries such as ["id"=>"name","dir"=>"desc"]. No default order. |
advanceSearch | Native array | No | Native list of structured rules: column (or id), condition, value, optional andOr=AND/OR and balanced special=(/) grouping. Operators: equal, notEqual, contains, greaterThan, greaterThanOrEqual, lesserThan, lesserThanOrEqual. Raw where clauses are rejected. |
Example request
$filters = FM_api('UserFilter_getRequestedDetails', [
'ids' => ['1088'],
'fields' => ['id', 'name', 'data', 'public', 'pageType'],
]);
Example response
[{"id":"1088","name":"Northwind jobs","data":"{\"searchValue\":\"Northwind\"}","public":"0","pageType":"pageJobs"}]
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. |
[] | No matches, or the shared reader’s query failed; failures are collapsed into an empty result. |
{"error":"unsupported raw advanced search"} | A raw where rule was supplied. |
{"error":"missing or invalid parameter: orderDesc"} | An unsupported sort direction was supplied. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Returns an array even for one ID; missing IDs are omitted. No pagination/limit, default ordering or input-order preservation. Empty ID arrays add no ID restriction and can return all rows.
- Mapped scalar text filters use trimmed, case-insensitive equality; native text arrays use membership. Numeric values are integer-coerced; empty numeric filter arrays match none. Supplied filters combine with AND.
- Unknown selected fields are ignored and
idis always included. Raw JSON columns remain encoded strings; JSON scalar/string values remain as stored. - Raw advanced-search SQL, unsafe directions, non-list field controls, nested filter values and malformed pagination/date-offset controls return structured errors before the query. Structured advanced-search grouping must be balanced.
- Only the current user’s own filters and public=1 filters are visible, including when an explicit ID is requested. Missing/private IDs are omitted; empty selectors never bypass this visibility predicate.
See it in Fieldmotion
CRM1
No direct CRM1 caller for this mapped route was found. CRM1 Settings → Filters uses UserFilters_getDT, UserFilter_setName, UserFilter_setPublic and UserFilter_delete.
CRM2
Open CRM2 Settings → Filters. Its UserFilter/UserFilters widget prefixes resolve through shared detail/table/edit helpers; filter browser Network requests for this exact route. Bulk Change Privacy retrieves IDs/public fields first.
Related endpoints
UserFilters_getapplies the current-user-or-public visibility predicate.UserFilters_getDataTableoffers mapped table pagination.