跳转到主要内容
PATCH
/
table
/
{tableId}
/
selection
/
clear
Clear selected range content
curl --request PATCH \
  --url http://127.0.0.1:3000/api/table/{tableId}/selection/clear \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "ranges": [
    [
      0,
      0
    ],
    [
      1,
      1
    ]
  ],
  "viewId": "viwXXXXXXX",
  "ignoreViewQuery": "<string>",
  "filterByTql": "{field} = 'Completed' AND {field} > 5",
  "filter": {},
  "search": [
    "searchValue",
    "fieldIdOrName",
    false
  ],
  "filterLinkCellCandidate": [
    "fldXXXXXXX",
    "recXXXXXXX"
  ],
  "filterLinkCellSelected": [
    "fldXXXXXXX",
    "recXXXXXXX"
  ],
  "selectedRecordIds": [
    "<string>"
  ],
  "orderBy": "<array>",
  "groupBy": [
    {
      "fieldId": "<string>",
      "order": "asc"
    }
  ],
  "collapsedGroupIds": [
    "<string>"
  ],
  "queryId": "qry_xxxxxxxx",
  "projection": [
    "<string>"
  ],
  "type": "columns"
}
EOF

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

路径参数

tableId
string
必填

请求体

application/json
ranges
number[][]
必填

The parameter "ranges" is used to represent the coordinates of a selected range in a table.

Minimum array length: 1
Required array length: 2 elements
示例:
[[0, 0], [1, 1]]
viewId
string

Set the view you want to fetch, default is first view. result will filter and sort by view options.

示例:

"viwXXXXXXX"

ignoreViewQuery

When a viewId is specified, configure this to true will ignore the view's filter, sort, etc

filterByTql
string
已弃用
示例:

"{field} = 'Completed' AND {field} > 5"

filter
object

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.

search

Search for records that match the specified field and value

Required array length: 1 element

Filter out the records that can be selected by a given link cell from the relational table. For example, if the specified field is one to many or one to one relationship, recordId for which the field has already been selected will not appear.

Required array length: 2 elements
示例:
["fldXXXXXXX", "recXXXXXXX"]

Filter out selected records based on this link cell from the relational table. Note that viewId, filter, and orderBy will not take effect in this case because selected records has it own order. Ignoring recordId gets all the selected records for the field

Required array length: 2 elements
示例:
["fldXXXXXXX", "recXXXXXXX"]
selectedRecordIds
string[]

Filter selected records by record ids

orderBy
array

An array of sort objects that specifies how the records should be ordered.

groupBy
object[] | null
collapsedGroupIds
string[]
queryId
string

When provided, other query parameters will be merged with the saved ones.

示例:

"qry_xxxxxxxx"

projection
string[]

If you want to get only some fields, pass in this parameter, otherwise all visible fields will be obtained

type
enum<string>

Types of non-contiguous selections

可用选项:
rows,
columns
示例:

"columns"

响应

200

Successful clean up

Last modified on January 25, 2026