When to use this endpoint

Use AssetMaintenance_disable when maintenance should stop producing future jobs but its record and completed history must remain available.

Authentication and permissions

The request must establish an authenticated tenant through signed API-key fields or a CRM session. The handler checks tenant context but does not require a user ID, role, page permission, or enabled Assets feature.

All lookups and writes are scoped to the authenticated tenant, except deletion of that tenant’s matching global scheduler row.

Parameters

ParameterTypeRequiredDescription
idInteger stringYesPositive maintenance ID. Existence and current active state are not validated.

Example request

$result = FM_api('AssetMaintenance_disable', [
	'id' => '61003',
]);

Example response

{
  "m": {
    "id": "61003",
    "name": "Filter service",
    "asset_id": "418",
    "recurrence_id": "879027"
  },
  "rec_id": 879027,
  "r": {
    "id": "879027",
    "ids": "2039001,2039002",
    "active": "1"
  },
  "appidsr": [
    {"id": "2039002"}
  ]
}

m and r are complete pre-change database rows; the example shows representative fields. Consequently r.active still shows its old value. appidsr lists jobs selected for deletion.

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: id"}id is absent or not positive.
Nominal response with false/empty row values and runtime warningsThe maintenance or recurrence row is missing.

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

Behaviour and edge cases

  • Completed jobs, the maintenance row, and the tenant recurrence row are retained. The recurrence becomes inactive.
  • The legacy comma-separated job ID list is used without normalization. Malformed stored data can cause a database error.
  • Repeating the call is permitted and returns the current rows; already deleted jobs are excluded.

Side effects

  • Soft-deletes selected jobs with their normal audit/deletion/relationship side effects.
  • Sets recurrence active=0, refreshes its edit datetime/marker, and hard-deletes the matching global scheduler row. The maintenance row itself is unchanged.

See it in Fieldmotion

CRM1

Open Assets → Maintenance, choose Disable on an active row, confirm the warning about incomplete jobs, and inspect AssetMaintenance_disable.

CRM2

No production CRM2 caller was found.

Related endpoints