Asset tables
Group Asset Table data by asset
/a/AssetTable_getDataByAsset
Group an asset’s encoded table-row data by table ID for job-form prefilling.
When to use this endpoint
Use AssetTable_getDataByAsset when loading an asset into CRM1’s job form and the form needs the asset’s table values alongside its ordinary fields.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
aid | Integer string | Yes | Asset ID. Zero is accepted and queries rows whose stored asset_id is zero; it does not mean all assets. Negative values are rejected. |
Example request
$tables = FM_api('AssetTable_getDataByAsset', [
'aid' => '418',
]);
Example response
{
"1700000000123": [
"{\"1\":\"8.2\",\"2\":\"passed\"}",
"{\"1\":\"8.0\",\"2\":\"passed\"}"
]
}
Errors and unusual responses
| Response | Condition |
|---|---|
{"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 negative. |
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 loaded newest edit first, then grouped under their
table_id. PHP object-key encoding means numeric table IDs appear as JSON object properties. - Each grouped value is the raw encoded
datastring; row IDs and timestamps are discarded. - The asset and its table definitions are not validated. There is no pagination or row limit.
See it in Fieldmotion
CRM1
Open a job form containing an asset field and select an asset. CRM1 fetches Asset_get, then AssetTable_getDataByAsset, and attaches the result as table_data for form callbacks.
CRM2
No production CRM2 caller was found.
Related endpoints
AssetTable_getDataretains row IDs and timestamps for one table.Asset_getsupplies the accompanying asset fields in CRM1.