When to use this endpoint

Use AssetTypes_getExportData after AssetTypes_getDataTable has collected the filtered IDs. CRM2’s export widget calls this route repeatedly with adaptive batch sizes.

Authentication and permissions

The request must authenticate with signed API-key fields or a logged-in CRM session. The handler performs no additional page or role-permission check.

The lookup and any write use the authenticated tenant; an ID from another tenant cannot be addressed through this call.

Parameters

ParameterTypeRequiredDescription
_idsJSON arrayYesNonempty JSON array of target IDs. Members are integer-converted; missing IDs are omitted.
fieldsJSON arrayYesOrdered export field IDs. Core values are id, last_edited, name, url, and attrs. Unknown ordinary names return an error.

Example request

$rows = FM_api('AssetTypes_getExportData', [
	'_ids' => json_encode(['47']),
	'fields' => json_encode(['id', 'name', 'url', 'attrs']),
]);

Example response

[
  {
    "asset_id": "47",
    "f0": "47",
    "f1": "Compressor",
    "f2": "https://example.test/assets",
    "f3": "Yes"
  }
]

asset_id is always included. Each core requested field is returned as fN, where N is its zero-based position in fields.

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: _ids"}_ids is absent.
{"error":"_ids should be a JSON array of numbers"}The value is invalid JSON, not an array, or an empty array.
{"error":"fields should be an array of requested field names"}fields is invalid JSON, not an array, or empty.
{"error":"unknown field name: FIELD"}A non-custom field is not in the core allowlist.

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

Behaviour and edge cases

  • url returns meta.url or blank. attrs maps mask 0 to No, 2 to Yes, and other masks to blank.
  • If url or attrs is requested more than once, only its first positional alias is converted; later aliases retain the raw metadata/mask value.
  • The SQL query has no ORDER BY. There is no server-side pagination beyond the caller-selected ID batch.

See it in Fieldmotion

CRM1

No production CRM1 caller was found; CRM1 downloads AssetTypes_export.

CRM2

Open Asset Types, choose Export, configure fields, and run the export. After collecting IDs, filter Network requests for repeated AssetTypes_getExportData batches.

Related endpoints