When to use this endpoint

Use Skills_getDataTable for CRM2’s configurable Skills list or another named-field query. It does not include assignment counts; load user-skill records separately when needed.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session. The handler performs no additional page or role-permission check.

The lookup and any write use the authenticated tenant; an ID from another tenant cannot be addressed through this call.

Parameters

ParameterTypeRequiredDescription
fieldsNative arrayYesRequested keys from id, name, cdate, lastEdited, and description. Unknown keys are ignored and id is always returned.
isTableInteger stringNoDefaults to table mode. Exact integer 0 returns only data and enables the optional non-table limit.
draw / start / lengthInteger stringsNoTable counter, offset, and page size; defaults are 0, 0, and 10. There is no endpoint-specific maximum.
limitInteger stringNoPositive non-table maximum. Zero or a negative value leaves the result unlimited.
orderBy / orderDescMapped name / directionNoExplicit ordering. Field resolution is case-insensitive before falling back; orderDesc is not normalized.
order[0][column] / order[0][dir]DataTables valuesNoFallback table ordering. The helper subtracts one for CRM2’s leading action column; exact desc reverses the result.
searchValue / searchFieldString / mapped name or native arrayNoCase-insensitive substring search over selected/all mapped fields.
Mapped field filtersScalar or native arrayNoText/datetime scalars use case-insensitive substring filters, integer scalars equality, and arrays IN.
referenceDate / dateFrom / dateTo / offsetsShared date-filter valuesNoInclusive relative-date filtering is technically available for mapped fields, but the skill timestamp map does not match the integer schema; avoid this feature here.
advanceSearch / groupByNative arraysNoCRM2 advanced conditions and mapped grouping. Unknown map fields are ignored.

Example request

$page = FM_api('Skills_getDataTable', [
	'fields' => ['id', 'name', 'description'],
	'searchValue' => 'electrical',
	'start' => '0',
	'length' => '25',
	'draw' => '5',
]);

Example response

{
  "data": [
    {"id": "42", "name": "Electrical testing", "description": "Qualified tester"}
  ],
  "draw": 5,
  "recordsTotal": "6",
  "recordsFiltered": "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: fields"}fields is absent.
{"error":"error in database query"}The generated mapped/filter query fails.
Runtime warning or type errorfields or another shared array option 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

  • All skills are eligible because the table has no archive or delete state. There is no implicit assignment/user filter.
  • Table mode returns paging metadata and database scalar counts. Non-table mode returns only data and is unlimited unless limit is positive.
  • This route returns skill columns only; CRM2 computes displayed user counts from a separate complete user-skill list.

See it in Fieldmotion

CRM1

CRM1 uses Skills_getDT and does not directly call this route.

CRM2

Open Users → Skills. The shared display widget derives Skills_getDataTable from the plural API prefix and sends visible/configured mapped fields.

Related endpoints