When to use this endpoint

Page the recurring sequences assigned directly to one asset.

Authentication and permissions

Authenticate with signed API-key fields or a logged-in CRM session. All records resolve in the authenticated tenant. This handler has no additional Job edit-bit, department-visibility or owner check.

Parameters

ParameterTypeRequiredDescription
aidInteger-like scalarYesAsset ID, intval. Presence is checked, but positivity and asset existence are not.
startInteger-like scalarYesZero-based offset, must coerce to at least 0.
lengthInteger-like scalarYesPositive page size; no upper bound or -1 all-rows mode.
drawInteger-like scalarNoEchoed as an integer, default 0.
order[0][column], order[0][dir]DataTables orderNoColumn 0=name, 2=expiry, 4=active; every other index=cdate. Descending only for exact desc, otherwise ascending.
search[value]StringNoRead but not used; this route does not implement a text filter.

Example request

$result = FM_api('JobRecurrence_getByAssetDT', ['aid'=>'301', 'start'=>'0', 'length'=>'10']);

Example response

{"draw":0,"recordsTotal":"0","recordsFiltered":"0","data":[]}

This is the verified empty asset-table response on the current schema; nonempty rows use the six-cell layout below.

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: aid"}aid absent; checked before tenant context.
{"error":"missing or invalid parameter: start"}Offset absent/negative.
{"error":"missing or invalid parameter: length"}Page size absent/nonpositive.
{"error":"Unable to read recurrences"}Main recurrence query failed.
{"error":"Unable to read recurrence jobs"}A child lookup failed.

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

Behaviour and edge cases

  • Selects customer_type=1 and customer_id=aid. There is no recurrence deleted column/filter on the current schema, no active-only filter and no extra customer ownership/department visibility filter.
  • Returns draw, recordsTotal, recordsFiltered and data. Both counts apply the same asset filter and are normally strings.
  • Each row is [name, jobs, edate, cdate, active, id]. jobs is a list of [integer job ID, tenant-local datetime]; only existing non-deleted cached jobs with a nonzero meeting epoch appear.
  • Normalizes positive cached IDs in first-seen order for display lookups, ignoring malformed/duplicate tokens. It never rewrites the stored cache or changes the anchor.

Side effects

  • Read-only: no membership repair, edit marker, history, scheduler or next-date mutation. Job display dates use tenant timezone.

See it in Fieldmotion

CRM1

Open an asset → Recurring Jobs; pageAssetRecurring sends DataTables state and aid to this endpoint.

CRM2

No direct CRM2 call found; mapped recurrence tables support customer/asset identity filters.

Related endpoints