Create a new table in the specified base with customizable fields, views, and initial records. Default configurations will be applied if not specified.
curl --request POST \
--url http://127.0.0.1:3000/api/base/{baseId}/table/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"dbTableName": "<string>",
"description": "<string>",
"icon": "<string>",
"fields": [
{
"type": "singleSelect",
"name": "<string>",
"unique": true,
"notNull": true,
"dbFieldName": "<string>",
"isLookup": true,
"isConditionalLookup": true,
"description": "this is a summary",
"lookupOptions": {
"foreignTableId": "<string>",
"lookupFieldId": "<string>",
"linkFieldId": "<string>",
"filter": {}
},
"options": {
"expression": "countall({values})",
"timeZone": "<string>",
"formatting": "<unknown>",
"showAs": {
"type": "url"
}
},
"aiConfig": {
"modelKey": "<string>",
"type": "extraction",
"sourceFieldId": "<string>",
"isAutoFill": true,
"attachPrompt": "<string>"
},
"id": "fldxxxxxxxxxxxxxxxx",
"order": {
"viewId": "<string>",
"orderIndex": 123
}
}
],
"views": [
{
"type": "grid",
"name": "<string>",
"description": "<string>",
"order": 123,
"options": {
"rowHeight": "short",
"fieldNameDisplayLines": 2,
"frozenColumnCount": 1,
"frozenFieldId": "<string>"
},
"sort": {
"sortObjs": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"manualSort": true
},
"filter": {},
"group": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"isLocked": true,
"shareId": "<string>",
"enableShare": true,
"shareMeta": {
"allowCopy": true,
"includeHiddenField": true,
"password": "<string>",
"includeRecords": true,
"submit": {
"allow": true,
"requireLogin": true
}
},
"columnMeta": {}
}
],
"records": [
{
"fields": {
"single line text": "text value"
}
}
],
"order": 123,
"fieldKeyType": "name"
}
'{
"id": "<string>",
"name": "<string>",
"dbTableName": "<string>",
"fields": [
{
"id": "<string>",
"name": "Tags",
"type": "singleSelect",
"options": {
"expression": "countall({values})",
"timeZone": "<string>",
"formatting": "<unknown>",
"showAs": {
"type": "url"
}
},
"cellValueType": "string",
"dbFieldType": "TEXT",
"dbFieldName": "<string>",
"description": "this is a summary",
"meta": {
"persistedAsGeneratedColumn": false
},
"aiConfig": {
"modelKey": "<string>",
"type": "extraction",
"sourceFieldId": "<string>",
"isAutoFill": true,
"attachPrompt": "<string>"
},
"isLookup": true,
"isConditionalLookup": true,
"lookupOptions": {
"relationship": "oneOne",
"foreignTableId": "<string>",
"lookupFieldId": "<string>",
"fkHostTableName": "<string>",
"selfKeyName": "<string>",
"foreignKeyName": "<string>",
"linkFieldId": "<string>",
"baseId": "<string>",
"filter": {}
},
"notNull": true,
"unique": true,
"isPrimary": true,
"isComputed": true,
"isPending": true,
"hasError": true,
"isMultipleCellValue": true,
"recordRead": true,
"recordCreate": true
}
],
"views": [
{
"id": "<string>",
"name": "<string>",
"type": "grid",
"createdBy": "<string>",
"createdTime": "<string>",
"columnMeta": {},
"description": "<string>",
"order": 123,
"options": {
"rowHeight": "short",
"fieldNameDisplayLines": 2,
"frozenColumnCount": 1,
"frozenFieldId": "<string>"
},
"sort": {
"sortObjs": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"manualSort": true
},
"filter": {},
"group": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"isLocked": true,
"shareId": "<string>",
"enableShare": true,
"shareMeta": {
"allowCopy": true,
"includeHiddenField": true,
"password": "<string>",
"includeRecords": true,
"submit": {
"allow": true,
"requireLogin": true
}
},
"lastModifiedBy": "<string>",
"lastModifiedTime": "<string>",
"pluginId": "<string>"
}
],
"records": [
{
"id": "<string>",
"fields": {},
"name": "<string>",
"autoNumber": 123,
"createdTime": "<string>",
"lastModifiedTime": "<string>",
"createdBy": "<string>",
"lastModifiedBy": "<string>",
"permissions": {},
"undeletable": true
}
],
"description": "<string>",
"icon": "<string>",
"order": 123,
"lastModifiedTime": "<string>",
"defaultViewId": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
params for create a table
1Table name in backend database. Limitation: 1-63 characters, start with letter, can only contain letters, numbers and underscore, case insensitive, cannot be duplicated with existing db table name in the base.
The description of the table.
The emoji icon string of the table.
The fields of the table. If it is empty, 3 fields include SingleLineText, Number, SingleSelect will and 3 empty records be generated by default.
显示 子属性
The field types supported by teable.
singleLineText, longText, user, attachment, checkbox, multipleSelect, singleSelect, date, number, rating, formula, rollup, conditionalRollup, link, createdTime, lastModifiedTime, createdBy, lastModifiedBy, autoNumber, button "singleSelect"
1Whether this field is not unique.
Whether this field is not null.
Field(column) name in backend database. Limitation: 1-63 characters, can only contain letters, numbers and underscore, case sensitive, cannot be duplicated with existing db field name in the table.
1Whether this field is lookup field. witch means cellValue and [fieldType] is looked up from the linked table.
Whether this lookup field applies a conditional filter when resolving linked records.
The description of the field.
"this is a summary"
The lookup options for field, you need to configure it when isLookup attribute is true or field type is rollup.
显示 子属性
the table this field is linked to
the field in the foreign table that will be displayed as the current field
The id of Linked record field to use for lookup
A filter object for complex query conditions based on fields, operators, and values. Use our visual query builder at https://app.teable.ai/developer/tool/query-builder to build filters.
The options of the field. The configuration of the field's options depend on the it's specific type.
显示 子属性
countall({values}), counta({values}), count({values}), sum({values}), average({values}), max({values}), min({values}), and({values}), or({values}), xor({values}), array_join({values}), array_unique({values}), array_compact({values}), concatenate({values}) The time zone that should be used to format dates
Different cell value types are determined based on the results of expression parsing
According to the results of expression parsing to determine different visual effects, where strings, numbers will provide customized "show as"
显示 子属性
can display as url, email or phone in string field with a button to perform the corresponding action, start a phone call, send an email, or open a link in a new tab
url, email, phone The id of the field that start with "fld", followed by exactly 16 alphanumeric characters /^fld[\da-zA-Z]{16}$/. It is sometimes useful to specify an id at creation time
"fldxxxxxxxxxxxxxxxx"
The views of the table. If it is empty, a grid view will be generated by default.
显示 子属性
grid, calendar, kanban, form, gallery, plugin 显示 子属性
The row height level of row in view
short, medium, tall, extraTall, autoFit The field name display lines in view
1 <= x <= 3The frozen column count in view. Deprecated: this field will be removed in a future release and may no longer take effect.
x >= 0Freeze to the right side of this field id in grid view
A filter object for complex query conditions based on fields, operators, and values. Use our visual query builder at https://app.teable.ai/developer/tool/query-builder to build filters.
A mapping of view IDs to their corresponding column metadata.
显示 子属性
显示 子属性
Order is a floating number, column will sort by it in the view.
Column width in the view.
If column hidden in the view.
Statistic function of the column in the view.
count, empty, filled, unique, max, min, sum, average, checked, unChecked, percentEmpty, percentFilled, percentUnique, percentChecked, percentUnChecked, earliestDate, latestDate, dateRangeOfDays, dateRangeOfMonths, totalAttachmentSize The record data of the table. If it is empty, 3 empty records will be generated by default.
[
{
"fields": { "single line text": "text value" }
}
]Define the key type of record.fields[key], You can click "systemInfo" in the field edit box to get fieldId or enter the table design screen with all the field details
id, name, dbFieldName Returns data about a table.
Complete table structure data and initial record data.
The id of table.
The name of the table.
Table name in backend database. Limitation: 1-63 characters, start with letter, can only contain letters, numbers and underscore, case insensitive, cannot be duplicated with existing db table name in the base.
The fields of the table.
显示 子属性
The id of the field.
The name of the field. can not be duplicated in the table.
"Tags"
The field types supported by teable.
singleLineText, longText, user, attachment, checkbox, multipleSelect, singleSelect, date, number, rating, formula, rollup, conditionalRollup, link, createdTime, lastModifiedTime, createdBy, lastModifiedBy, autoNumber, button "singleSelect"
The configuration options of the field. The structure of the field's options depend on the field's type.
显示 子属性
countall({values}), counta({values}), count({values}), sum({values}), average({values}), max({values}), min({values}), and({values}), or({values}), xor({values}), array_join({values}), array_unique({values}), array_compact({values}), concatenate({values}) The time zone that should be used to format dates
Different cell value types are determined based on the results of expression parsing
According to the results of expression parsing to determine different visual effects, where strings, numbers will provide customized "show as"
显示 子属性
can display as url, email or phone in string field with a button to perform the corresponding action, start a phone call, send an email, or open a link in a new tab
url, email, phone The cell value type of the field.
string, number, boolean, dateTime The field type of database that cellValue really store.
TEXT, INTEGER, DATETIME, REAL, BLOB, JSON, BOOLEAN Field(column) name in backend database. Limitation: 1-63 characters, can only contain letters, numbers and underscore, case sensitive, cannot be duplicated with existing db field name in the table.
1The description of the field.
"this is a summary"
The metadata of the field. The structure of the field's meta depend on the field's type. Currently formula and link fields have meta.
显示 子属性
Whether this formula field is persisted as a generated column in the database. When true, the field value is computed and stored as a database generated column.
Whether this field is lookup field. witch means cellValue and [fieldType] is looked up from the linked table.
Whether this lookup field applies a conditional filter when resolving linked records.
field lookup options.
显示 子属性
describe the relationship from this table to the foreign table
oneOne, manyMany, oneMany, manyOne the table this field is linked to
the field in the foreign table that will be displayed as the current field
the table name for storing keys, in many-to-many relationships, keys are stored in a separate intermediate table; in other relationships, keys are stored on one side as needed
the name of the field that stores the current table primary key
The name of the field that stores the foreign table primary key
The id of Linked record field to use for lookup
the base id of the table that this field is linked to, only required for cross base link
A filter object for complex query conditions based on fields, operators, and values. Use our visual query builder at https://app.teable.ai/developer/tool/query-builder to build filters.
Whether this field is not null.
Whether this field is not unique.
Whether this field is primary field.
Whether this field is computed field, you can not modify cellValue in computed field.
Whether this field's calculation is pending.
Whether This field has a configuration error. Check the fields referenced by this field's formula or configuration.
Whether this field has multiple cell value.
Field record read permission. When set to false, reading records is denied. When true or not set, reading records is allowed.
Field record create permission. When set to false, creating records is denied. When true or not set, creating records is allowed.
The views of the table.
显示 子属性
grid, calendar, kanban, form, gallery, plugin A mapping of view IDs to their corresponding column metadata.
显示 子属性
显示 子属性
Order is a floating number, column will sort by it in the view.
Column width in the view.
If column hidden in the view.
Statistic function of the column in the view.
count, empty, filled, unique, max, min, sum, average, checked, unChecked, percentEmpty, percentFilled, percentUnique, percentChecked, percentUnChecked, earliestDate, latestDate, dateRangeOfDays, dateRangeOfMonths, totalAttachmentSize 显示 子属性
The row height level of row in view
short, medium, tall, extraTall, autoFit The field name display lines in view
1 <= x <= 3The frozen column count in view. Deprecated: this field will be removed in a future release and may no longer take effect.
x >= 0Freeze to the right side of this field id in grid view
A filter object for complex query conditions based on fields, operators, and values. Use our visual query builder at https://app.teable.ai/developer/tool/query-builder to build filters.
The records of the table.
显示 子属性
The record id.
primary field value
Auto number, a unique identifier for each record
Created time, date ISO string (new Date().toISOString).
Last modified time, date ISO string (new Date().toISOString).
Created by, user name
Last modified by, user name
Whether the record is undeletable
The description of the table.
The emoji icon string of the table.
The last modified time of the table.
The default view id of the table.
此页面对您有帮助吗?
curl --request POST \
--url http://127.0.0.1:3000/api/base/{baseId}/table/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"dbTableName": "<string>",
"description": "<string>",
"icon": "<string>",
"fields": [
{
"type": "singleSelect",
"name": "<string>",
"unique": true,
"notNull": true,
"dbFieldName": "<string>",
"isLookup": true,
"isConditionalLookup": true,
"description": "this is a summary",
"lookupOptions": {
"foreignTableId": "<string>",
"lookupFieldId": "<string>",
"linkFieldId": "<string>",
"filter": {}
},
"options": {
"expression": "countall({values})",
"timeZone": "<string>",
"formatting": "<unknown>",
"showAs": {
"type": "url"
}
},
"aiConfig": {
"modelKey": "<string>",
"type": "extraction",
"sourceFieldId": "<string>",
"isAutoFill": true,
"attachPrompt": "<string>"
},
"id": "fldxxxxxxxxxxxxxxxx",
"order": {
"viewId": "<string>",
"orderIndex": 123
}
}
],
"views": [
{
"type": "grid",
"name": "<string>",
"description": "<string>",
"order": 123,
"options": {
"rowHeight": "short",
"fieldNameDisplayLines": 2,
"frozenColumnCount": 1,
"frozenFieldId": "<string>"
},
"sort": {
"sortObjs": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"manualSort": true
},
"filter": {},
"group": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"isLocked": true,
"shareId": "<string>",
"enableShare": true,
"shareMeta": {
"allowCopy": true,
"includeHiddenField": true,
"password": "<string>",
"includeRecords": true,
"submit": {
"allow": true,
"requireLogin": true
}
},
"columnMeta": {}
}
],
"records": [
{
"fields": {
"single line text": "text value"
}
}
],
"order": 123,
"fieldKeyType": "name"
}
'{
"id": "<string>",
"name": "<string>",
"dbTableName": "<string>",
"fields": [
{
"id": "<string>",
"name": "Tags",
"type": "singleSelect",
"options": {
"expression": "countall({values})",
"timeZone": "<string>",
"formatting": "<unknown>",
"showAs": {
"type": "url"
}
},
"cellValueType": "string",
"dbFieldType": "TEXT",
"dbFieldName": "<string>",
"description": "this is a summary",
"meta": {
"persistedAsGeneratedColumn": false
},
"aiConfig": {
"modelKey": "<string>",
"type": "extraction",
"sourceFieldId": "<string>",
"isAutoFill": true,
"attachPrompt": "<string>"
},
"isLookup": true,
"isConditionalLookup": true,
"lookupOptions": {
"relationship": "oneOne",
"foreignTableId": "<string>",
"lookupFieldId": "<string>",
"fkHostTableName": "<string>",
"selfKeyName": "<string>",
"foreignKeyName": "<string>",
"linkFieldId": "<string>",
"baseId": "<string>",
"filter": {}
},
"notNull": true,
"unique": true,
"isPrimary": true,
"isComputed": true,
"isPending": true,
"hasError": true,
"isMultipleCellValue": true,
"recordRead": true,
"recordCreate": true
}
],
"views": [
{
"id": "<string>",
"name": "<string>",
"type": "grid",
"createdBy": "<string>",
"createdTime": "<string>",
"columnMeta": {},
"description": "<string>",
"order": 123,
"options": {
"rowHeight": "short",
"fieldNameDisplayLines": 2,
"frozenColumnCount": 1,
"frozenFieldId": "<string>"
},
"sort": {
"sortObjs": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"manualSort": true
},
"filter": {},
"group": [
{
"fieldId": "<string>",
"order": "asc"
}
],
"isLocked": true,
"shareId": "<string>",
"enableShare": true,
"shareMeta": {
"allowCopy": true,
"includeHiddenField": true,
"password": "<string>",
"includeRecords": true,
"submit": {
"allow": true,
"requireLogin": true
}
},
"lastModifiedBy": "<string>",
"lastModifiedTime": "<string>",
"pluginId": "<string>"
}
],
"records": [
{
"id": "<string>",
"fields": {},
"name": "<string>",
"autoNumber": 123,
"createdTime": "<string>",
"lastModifiedTime": "<string>",
"createdBy": "<string>",
"lastModifiedBy": "<string>",
"permissions": {},
"undeletable": true
}
],
"description": "<string>",
"icon": "<string>",
"order": 123,
"lastModifiedTime": "<string>",
"defaultViewId": "<string>"
}