When to use this endpoint

Use for the legacy grid or choose getAll for an unpaged type-specific map selector.

Authentication and permissions

Use signed API-key authentication or a logged-in CRM session. API keys act as their owner; session requests use dispatcher CSRF protection when configured.

Requires a valid tenant account and View on pageImportsMappings. Reads and writes use this account’s tenant tables.

Parameters

ParameterTypeRequiredDescription
start / length / drawInteger-compatibleYesRequired nonnegative integers or decimal integer strings. start is offset, length page size and draw is echoed. Negative values and length=-1 are rejected.
order[0].column / order[0].dirNative DataTables orderYesRequired column and asc/desc direction. Column 0 ID, 1 Unix cdate, 2 import_type, 3 name; others sort ID. ID breaks ties.

Example request

$result = FM_api('ImportMappings_getDT', ['start'=>'0','length'=>'10','draw'=>'1','order'=>[['column'=>'0','dir'=>'asc']]]);

Example response

{
  "draw": 1,
  "recordsTotal": "1",
  "recordsFiltered": "1",
  "data": [
    [
      "8",
      "1793872800",
      "customers",
      "Customers by name",
      "{\"Name\":\"name\"}",
      ""
    ]
  ]
}

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": "permission denied"}The user lacks the required Imports page action.

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

Behaviour and edge cases

  • Reads all tenant mappings with validated offset/limit and ordering; no search/type filter. recordsTotal and recordsFiltered are the same total count, before paging.
  • Six positional cells: ID, raw Unix cdate, import_type, name, encoded mappings, empty UI action placeholder. draw is an integer; database scalars retain their types.

Side effects

  • Reads data without modifying import settings, imported records, history, queues or notifications.

See it in Fieldmotion

CRM1

Load CRM1 Settings > Imports > Mappings and inspect ImportMappings_getDT; View parses the row’s mapping JSON locally.

CRM2

CRM2 uses ImportMappings_getDataTable instead.

Related endpoints