When to use this endpoint

Use Skills_getDT only for CRM1’s Skills table or a client reproducing its positional contract. CRM2 uses Skills_getDataTable.

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
lengthInteger stringYesPage size after integer conversion. It must be from 1 through 100. Validation occurs before authentication.
startInteger stringNoZero-based SQL offset; defaults to 0. Negative values are not rejected and can cause the database query to fail, yielding an empty page.
order[0][column]Integer stringNo in code0 selects ID and 1 selects name; other values fall back to name. Omission is affected by a legacy cast/precedence bug and can select ID while emitting a runtime warning.
order[0][dir]StringNo in codeExact asc selects ascending order; every other value, including an omitted value, selects descending order.
drawInteger stringNo in codeDataTables draw counter returned after integer conversion; omission becomes 0 and may emit a runtime warning.

Example request

$page = FM_api('Skills_getDT', [
	'start' => '0',
	'length' => '25',
	'order' => [['column' => '1', 'dir' => 'asc']],
	'draw' => '2',
]);

Example response

{
  "draw": 2,
  "recordsTotal": "6",
  "recordsFiltered": "6",
  "data": [
    ["42", "Electrical testing", "Qualified tester", 3, ""]
  ]
}

Each row is [id, name, description, assignment_count, ""]. The count is a JSON integer; other database values remain strings.

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: length"}length is absent, below 1, or above 100.
Empty data with unchanged countsThe page query fails, including a possible negative offset; the handler replaces a false row result with an empty array.

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

Behaviour and edge cases

  • There is no search or filtering. recordsFiltered always equals the total skill count.
  • Assignment counts are computed only for skills on the returned page and count raw user_skills rows, without distinct-user or user-status checks.
  • Skills have no archived/deleted state. The final empty string is a legacy action-column placeholder.

See it in Fieldmotion

CRM1

Open Users → Skills, then sort or page the table. CRM1 sends Skills_getDT.

CRM2

CRM2’s Skills screen uses the shared named-field Skills_getDataTable route and separately loads user-skill assignments.

Related endpoints