curl --request POST \
--url https://app.teable.ai/api/table/%7BtableId%7D/field/plan \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"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":null,"showAs":{"type":"url"}},"aiConfig":{"modelKey":"string","isAutoFill":true,"attachPrompt":"string","type":"extraction","sourceFieldId":"string"},"id":"fldxxxxxxxxxxxxxxxx","order":{"viewId":"string","orderIndex":0}}'{
"estimateTime": 123,
"updateCellCount": 123,
"graph": {
"nodes": [
{
"id": "<string>",
"label": "<string>",
"comboId": "<string>"
}
],
"edges": [
{
"source": "<string>",
"target": "<string>",
"label": "<string>"
}
],
"combos": [
{
"id": "<string>",
"label": "<string>"
}
]
},
"linkFieldCount": 123
}Post table fieldplan
Generate calculation plan for creating the field
curl --request POST \
--url https://app.teable.ai/api/table/%7BtableId%7D/field/plan \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"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":null,"showAs":{"type":"url"}},"aiConfig":{"modelKey":"string","isAutoFill":true,"attachPrompt":"string","type":"extraction","sourceFieldId":"string"},"id":"fldxxxxxxxxxxxxxxxx","order":{"viewId":"string","orderIndex":0}}'{
"estimateTime": 123,
"updateCellCount": 123,
"graph": {
"nodes": [
{
"id": "<string>",
"label": "<string>",
"comboId": "<string>"
}
],
"edges": [
{
"source": "<string>",
"target": "<string>",
"label": "<string>"
}
],
"combos": [
{
"id": "<string>",
"label": "<string>"
}
]
},
"linkFieldCount": 123
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
路径参数
请求体
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.
1^\w{0,63}$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.
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.
- Option 1
- Option 2
Show child attributes
Show child attributes
The options of the field. The configuration of the field's options depend on the it's specific type.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
Show child attributes
Show child attributes
The AI configuration of the field.
Show child attributes
Show child attributes
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"
Show child attributes
Show child attributes
此页面对您有帮助吗?

