Skills
List skills for the legacy table
/a/Skills_getDT
Return the legacy CRM1 Skills DataTables page with positional rows and assignment counts.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
length | Integer string | Yes | Page size after integer conversion. It must be from 1 through 100. Validation occurs before authentication. |
start | Integer string | No | Zero-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 string | No in code | 0 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] | String | No in code | Exact asc selects ascending order; every other value, including an omitted value, selects descending order. |
draw | Integer string | No in code | DataTables 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
| 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":"missing or invalid parameter: length"} | length is absent, below 1, or above 100. |
Empty data with unchanged counts | The 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.
recordsFilteredalways equals the total skill count. - Assignment counts are computed only for skills on the returned page and count raw
user_skillsrows, 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
Skills_getDataTableis CRM2’s table contract.Skill_listUsersreturns direct assignments for one skill.