Asset tables
Delete an Asset Table definition
/a/AssetTable_deleteFromConfig
Remove one Asset Table definition from the tenant setting while retaining its stored data.
When to use this endpoint
Use AssetTable_deleteFromConfig as the definition-removal step of CRM2’s Delete Table workflow. Delete the corresponding rows separately if the data must also be removed.
Authentication and permissions
The request must establish an authenticated tenant through signed API-key fields or a CRM session. The handler checks tenant context but does not require a user ID, client-admin role, or page permission.
Only the authenticated tenant’s asset-tables setting can be changed.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tid | String or integer | Yes | Exact key to remove from the decoded asset-tables setting. It is not integer-converted or otherwise validated. |
Example request
$result = FM_api('AssetTable_deleteFromConfig', [
'tid' => '1700000000123',
]);
Example response
{
"ok": 1
}
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: tid"} | The tid key is absent. Blank is accepted but normally fails the definition lookup. |
{"error":"error deleting table - config not found"} | The tenant has no decodable asset-tables setting. |
{"error":"error deleting table - config for table id <tid> not found"} | The supplied key is not present in the setting. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Remaining definitions are JSON-encoded and written back without reordering or validating their field structures.
Side effects
- Rewrites the shared
asset-tablestenant setting and clears its cache. No audit entry is written.
See it in Fieldmotion
CRM1
No production CRM1 caller was found; CRM1 exposes definition editing but not this focused delete call.
CRM2
Open an asset’s Tables area, choose Delete Table, enter the confirmation phrase, and inspect AssetTable_deleteFromConfig followed by AssetTable_deleteAll.
Related endpoints
AssetTable_deleteAlldeletes table data, not the definition.AssetTable_editcreates or replaces a definition.