When to use this endpoint

Use AssetTable_export from CRM2’s embedded Asset Table export button. The response is a file download, not JSON.

Authentication and permissions

The handler requires a logged-in tenant user and view access to pageAssetTables. Client administrators always pass the permission check.

CRM2 posts its session CSRF token through the API dispatcher. Signed integrations must authenticate normally.

Parameters

ParameterTypeRequiredDescription
aidInteger stringYesPositive asset ID. The query also requires the joined asset to have deleted=0.
tidInteger stringYesPositive table ID. Its current definition supplies the CSV field headings; a missing definition produces only the two fixed headings.
searchStringNoWhen truthy, case-sensitive/collation-dependent substring search against the stored JSON text. Blank and string 0 apply no search filter.

Example request

// Use an authenticated POST/download client, not a JSON decoder.
[
	'aid' => '418',
	'tid' => '1700000000123',
	'search' => 'passed',
]

Example response

Asset ID, Asset Name,"Pressure","Result"
418,Compressor A,8.2,passed

The response has Content-Type: text/csv, attachment filename table_data_export.csv, and no JSON envelope.

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 is absent or not positive. This validation occurs before the login check.
{"error":"missing or invalid parameter: tid"}tid is absent or not positive.
{"error":"permission denied"}The user lacks view access to Asset Tables.

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 creation datetime ascending and streamed in batches of 50 until exhausted. There is no overall row limit.
  • Rows belonging to soft-deleted assets are excluded. The handler does not otherwise validate the asset or table definition.
  • Invalid or scalar row JSON produces a CSV row containing only asset ID and asset name.

See it in Fieldmotion

CRM1

No production CRM1 export caller was found; its Asset Tables page manages rows but does not add an export button.

CRM2

Open an asset table, click Export, and inspect the form post routed to AssetTable_export.

Related endpoints