When to use this endpoint

Use Assets_getByType for a minimal name-only lookup. Use Assets_list when IDs or additional fields are needed.

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
typeInteger-compatibleYesAsset type ID. Blank and nonnumeric values become 0.

Example request

$assets = FM_api('Assets_getByType', [
	'type' => '17',
]);

Example response

[
  {"name": "Compressor 4"},
  {"name": "Compressor 8"}
]

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: type"}The key is absent.

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

Behaviour and edge cases

  • Rows are ordered by name and exclude soft-deleted assets, but archived and inactive assets remain included.
  • Names are not deduplicated, IDs are not returned, and there is no pagination.

See it in Fieldmotion

CRM1

No direct production CRM1 caller was found.

CRM2

No direct production CRM2 caller was found; current selectors use mapped tables or Assets_listSimple.

Related endpoints