When to use this endpoint

Use the History dialog’s remove-history-only action. For business-record cleanup, understand deleteById and its failure caveats separately.

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 pageImportsHistory plus Delete. Reads and writes use this account’s tenant tables.

Parameters

ParameterTypeRequiredDescription
idPositive integer or decimal integer stringYesUse the source or tenant row ID returned by its list/table. Fractions, negative numbers, arrays and out-of-range integers are rejected. This is not the import run token.

Example request

$result = FM_api('ImportHistory_delete', ['id'=>'312']);

Example response

{
  "ok": 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": "permission denied"}The user lacks the required Imports page action.
{"error": "missing or invalid parameter: id"}A required row ID is missing or invalid.
{"error": "invalid import_id provided"}The requested owned source or tenant row does not exist.

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

Behaviour and edge cases

  • Removes only the tenant import log in a checked transaction with a tenant audit. Does not delete imported objects, restore edited values, change their metadata markers or touch maps/sources/remote files.
  • A missing log returns {ok:1,warning:"log does not exist: ID"}; repeating history-only deletion is safe. The log ID is not the import run token.

Side effects

  • Checked import-log removal and tenant audit. No business-record deletion or remote operation.

See it in Fieldmotion

CRM1

In CRM1 History, choose the option to remove only the import history record; inspect ImportHistory_delete.

CRM2

In CRM2 History, choose the remove-history-only option in the per-run dialog; the call does not remove the imported objects.

Related endpoints