When to use this endpoint

Use Assets_list for an unpaged asset lookup where the caller controls a small field allowlist. Use the DataTable endpoints for server paging.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session. The handler requires login or an established tenant database context and performs no additional Asset-page or role-permission check unless the page says otherwise.

Every query and write uses the authenticated tenant’s tables. CRM1 and CRM2 may hide actions through client-side permissions that these collection routes do not repeat.

Parameters

ParameterTypeRequiredDescription
allPresence flagNoWhen absent, excludes archived assets. Any present value, including 0, includes archived rows.
type_idNative arrayNoType IDs; used only when the first value is a positive integer.
nameStringNoTrimmed, lowercase substring search on asset name.
activeInteger-compatibleNoExact active flag. Presence matters, so blank filters as 0.
always_includeInteger-compatibleNoPositive ID included even when it fails archive, type, name, active, or date filters, but never when soft-deleted.
date_from / date_toUnix timestampsNoWhen both are positive and date_from<date_to, excludes assets whose movement intervals overlap the inclusive local datetime window.
fieldsJSON array string or native arrayNoAllowlisted fields: id, name, code, owner_id, type_id, last_edited, and location_id. Defaults to id,name when none are valid.

Example request

$assets = FM_api('Assets_list', [
	'type_id' => ['17'],
	'fields' => json_encode(['id', 'name', 'code']),
]);

Example response

[
  {"id": "4821", "name": "Compressor 4", "code": "CMP-004"}
]

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.

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 explicit ordering, pagination, or result limit. Database scalar values remain strings.
  • The date window is an availability exclusion based on movement history, not an asset creation/edit-date filter.
  • Movement rows tied to a deleted or missing job do not block availability; retained history without a job still participates. Deleting a job does not erase historical movements.

See it in Fieldmotion

CRM1

Asset selectors, the Asset Timeline, maintenance selectors, and migration tools call this route with different allowlists.

CRM2

CRM2 migration tooling calls it during controlled data replacement; primary CRM2 Asset screens use Assets_getDataTable.

Related endpoints