What a field definition covers
- UI rendering: type, input_type, options, groups, tabs, and display order.
- Persistence: SQL type, SQL definition, default values, regex pattern.
- Data behavior: searchability, search condition, list visibility.
- References: join table and key mappings for linked values.
High-impact fields
- name: should match the DB column name.
- table_key: marks the key field of the metadata table.
- view_index: controls deterministic ordering in the UI.
- search_condition: controls SQL operator mapping.
Field definition endpoints
GET /api/fielddefinitions
GET /api/fielddefinitions/{uuid}
POST /api/fielddefinitions
PUT /api/fielddefinitions/{uuid}
DELETE /api/fielddefinitions/{uuid}
GET /api/datalist/metadata/{name}/fielddefinitions
Example payload
{
"metadata_name": "brands",
"name": "name",
"label": "Name",
"type": "input",
"input_type": "text",
"sql_type": "varchar(255)",
"table_key": false,
"searchable": true,
"search_condition": "_contains",
"search_field_name": "name_contains",
"show_in_list": true,
"view_index": 1
}