码巢引擎2026年开发文档
00-开发规范
后端规范
README
后端开发手册
前端规范
README
TypeScript最佳实践
前端布局规范
前端页面模板
前端颜色与组件规范
核心规范
组件配置手册
问题排查指南
页面模板
最佳实践
README
bp-20260223-m7ps
图片上传优化总结
BUG自动记录系统使用指南
README
TYPE_SAFETY_GUIDE
常见BUG知识库
常见BUG知识库
开发前检查清单
开发安全规范
开发规范-完整版-含FutureBirdAadminAi部署
数据模型字典
文档分类规范
文档标准化规范
文档模板-基础版
文档模板-技术版
类型安全快速参考卡
类型安全规范体系
规范更新指南
过期文档清理机制
错误处理规范
错误预防指南
常见BUG知识库
常见BUG知识库
01-快速开始
Gitee快速开始
README
协作快速开始
快速开始
质量保证快速开始
02-部署指南
Docker更新指南
Docker部署
FutureBirdAadminAi部署指南
FutureBirdAadminAi部署问题分析
README
发布指南
宝塔Docker部署教程
宝塔PM2部署教程
宝塔图形化部署教程
快速发布指南
数据库和依赖变更处理指南
构建和发布
构建标准
构建检查清单
生产部署快速开始
生产部署方案
生产部署标准
生产部署检查清单
程序备份性能
自动修复和发布指南
自动化发布命令使用指南
部署快速开始
部署指南
项目更新部署指南
03-开发指南
Git凭据配置
Git推送规则
Git自动配置
README
全局样式
协作设置
定时任务
开发指南
开发流程
开发环境标准
技术改进
贡献指南
项目目录树
项目目录结构
04-API文档
API接口文档
README
hr-api
企业API
05-数据库
DATABASE_SCHEMA
README
分区指南
数据库字典
数据持久化
数据模型统一
数据迁移
06-架构设计
RBAC-PERMISSIONS
README
SaaS客户引导流程设计
companyId统一规范
employee-permission-system-design
enterprise-data-linkage
仓库实现总结
仓库模式
企业管理端员工权限系统分析
前端架构
前端重构总结
员工权限系统评估报告
员工管理菜单重构方案
权限系统混乱问题分析
架构优化计划
架构使用指南
架构结构
架构结构
状态管理
用户身份管理体系
系统架构
面试管理模块重构规划
项目技术栈
07-测试质量
README
测试修复标准
测试报告
质量保证系统
08-版本管理
CHANGELOG
README
VERSION_RULES
09-配置指南
README
SMTP配置指南
主题切换指南
渠道配置指南
环境变量指南
环境隔离
12-项目记忆
README
知识库导入指南
记忆系统指南
13-迁移指南
README
备份迁移指南
管理员迁移指南
迁移快速开始
17-其他
README
压缩摘要
18-开放平台
01-架构设计
02-API接口设计
03-安全机制
04-前端设计
05-数据库设计
开放平台API指南
开放平台API说明
19-智能进化
AI执行规则
AI进化机制
README
自动化实现总览
黄金规则
40-操作教程
README
微信公众号域名配置指南
微信本地开发调试指南
44-技能文件
alipay-payment-integration
references
checklist
SKILL
audio
python
README
typescript
README
SKILL
database
python
README
typescript
README
SKILL
design-style-thinking
SKILL
doctor
references
sql-patterns
SKILL
document-generation
python
README
SKILL
email
SKILL
embedding
python
README
typescript
README
SKILL
expo-advanced
references
audio-record-play
file-upload
masonry-layout
save-to-gallery
top-tab-navigation
SKILL
feishu-base
SKILL
feishu-message
SKILL
fetch-url
python
README
typescript
README
SKILL
frontend-design
LICENSE
SKILL
FutureBird-coding-web-performance-best-practice
SKILL
general-dev-preview
references
web-preview
SKILL
image-generation
python
README
typescript
README
SKILL
knowledge
references
python
README
typescript
README
cli
SKILL
llm
python
README
typescript
README
SKILL
miniapp-upload-asr
SKILL
pptx-generation
python
README
SKILL
project-memory-loader
scripts
project_memory_loader
SKILL
repair
scripts
merge-commit-map
SKILL
shadcn-web-base-theme
assets
colors
amber
artistic-green
bento-blue
blue
cyan
emerald
fuchsia
gray
green
indigo
lime
low-pink
neutral
orange
purple
red
retro-brown
rose
sky
supbase-green
teal
tech-purple
vintage-grey
violet
yellow
fonts
business
classic
playful
radius
2xl
2xs
lg
md
none
sm
xl
xs
shadow
artistic
bento
cool
retro
superbase
tech
tool
vintage
default
references
colors
fonts
quick
radius
shadows
scripts
theme
SKILL
package
skill-creator-coze
scripts
init_skill
quick_validate
SKILL
storage
python
README
typescript
README
SKILL
supabase
assets
supabase-client
supabase-client
references
_future
asset-supabase-browser
asset-supabase-config-inject
asset-supabase-config-route
python-auth
python-realtime
python-storage
typescript-auth
typescript-realtime
typescript-storage
typescript-supabase-browser
typescript-supabase-config-inject
typescript-supabase-config-route
python
README
database
edge-functions
orm-model-guide
supabase_client
typescript
README
database
drizzle-schema-guide
edge-functions
supabase-client
cli
rls
SKILL
supabase-auth
references
typescript
supabase-browser
supabase-config-inject
supabase-config-route
auth-config
verify-session
SKILL
ui-design-ref
reference
3D黏土风
克莱因蓝高定风
暗黑科技风
杂志风
极光柔和
柔和卡片
玻璃拟态
纯白极简风
自然有机
SKILL
ui-ux-pro-max
scripts
core
design_system
search
SKILL
vercel-composition-patterns
rules
architecture-avoid-boolean-props
architecture-compound-components
patterns-children-over-render-props
patterns-explicit-variants
react19-no-forwardref
state-context-interface
state-decouple-implementation
state-lift-state
AGENTS
SKILL
vercel-react-best-practices
rules
advanced-event-handler-refs
advanced-init-once
advanced-use-latest
async-api-routes
async-defer-await
async-dependencies
async-parallel
async-suspense-boundaries
bundle-barrel-imports
bundle-conditional
bundle-defer-third-party
bundle-dynamic-imports
bundle-preload
client-event-listeners
client-localstorage-schema
client-passive-event-listeners
client-swr-dedup
js-batch-dom-css
js-cache-function-results
js-cache-property-access
js-cache-storage
js-combine-iterations
js-early-exit
js-hoist-regexp
js-index-maps
js-length-check-first
js-min-max-loop
js-set-map-lookups
js-tosorted-immutable
rendering-activity
rendering-animate-svg-wrapper
rendering-conditional-render
rendering-content-visibility
rendering-hoist-jsx
rendering-hydration-no-flicker
rendering-hydration-suppress-warning
rendering-svg-precision
rendering-usetransition-loading
rerender-defer-reads
rerender-dependencies
rerender-derived-state-no-effect
rerender-derived-state
rerender-functional-setstate
rerender-lazy-state-init
rerender-memo-with-default-value
rerender-memo
rerender-move-effect-to-event
rerender-simple-expression-in-memo
rerender-transitions
rerender-use-ref-transient-values
server-auth-actions
server-cache-lru
server-cache-react
server-dedup-props
server-parallel-fetching
server-serialization
AGENTS
SKILL
video-edit
python
README
typescript
README
SKILL
video-generation
python
README
typescript
README
SKILL
volcano-ark
SKILL
web-design-guidelines
SKILL
web-search
python
README
typescript
README
SKILL
webrtc-best-practice
SKILL
websocket-guide
references
nextjs
nodejs
SKILL
wechat-bot
SKILL
wechat-official-account
SKILL
README
README
未来鸟:企业数字化转型奔腾的力量!
-
+
首页
SKILL
--- name: feishu-base description: 飞书多维表格,支持以下功能:1. 创建多维表格;2. 创建多维表格数据表;3. 列出多维表格下的全部数据表;4. 获取多维表格的元数据;5. 在多维表格数据表中新增多条记录;6. 根据 record_id 检索多维表格数据表中的记录;7. 批量更新多维表格数据表中的现有记录;8. 查询多维表格数据表中的记录;9. 搜索多维表格类型的文档; license: MIT --- # 飞书多维表格集成描述 这是一个用于 Python 环境的飞书多维表格外部集成(官方)使用说明文档,内部适配飞书多维表格开放平台接口规范,提供标准化的数据读写、视图管理及记录操作能力。无需开发者手动配置应用凭证(App ID 与 App Secret),可快速实现单条记录增删改、批量数据导入导出、视图筛选配置及关联表格数据查询等核心操作。 重要提示 1. 不要询问用户任何密钥或环境变量,也不需要你设置密钥或环境变量,access_token 将通过以下方式获取。 from FutureBirdAadminAi_workload_identity import Client client = Client() access_token = client.get_integration_credential(\"integration-feishu-base\") 2. 为了记录API调用情况,生成的集成函数调用都需要 observe 函数装饰,observe 函数通过 from FutureBirdAadminAiloop.decorator import observe 导入 3. **app_token 和 table_id 没有指定时候需要用户手动输入作为智能体的入参** # 使用说明 -- 请参阅以下代码片段和文档 URL(如有),了解如何使用此集成 -- 捕获请求异常(如网络错误、4xx/5xx 状态码), 实现异常重试机制(针对429限流、503服务不可用等错误, 处理各种异常情况,并记录错误详情,便于问题排查。 # 代码示例 ```python import requests from functools import wraps from FutureBirdAadminAiloop.decorator import observe from FutureBirdAadminAi_workload_identity import Client client = Client() def get_access_token() -> str: """ 获取飞书多维表格(Bitable)的租户访问令牌。 """ access_token = client.get_integration_credential(\"integration-feishu-base\") return access_token def require_token(func): @wraps(func) def wrapper(self, *args, **kwargs): self.access_token = get_access_token() if not self.access_token: raise ValueError(\"FEISHU_TENANT_ACCESS_TOKEN is not set\") return func(self, *args, **kwargs) return wrapper class FeishuBitable: """ 飞书多维表格(Bitable)HTTP 客户端。 所有方法返回值均为 Feishu OpenAPI 标准响应:"{\"code\": int, \"msg\": str, \"data\": any}" 基础 URL 默认 "https://open.larkoffice.com/open-apis"。 """ def __init__(self, base_url: str = \"https://open.larkoffice.com/open-apis\", timeout: int = 30): self.base_url = base_url.rstrip(\"/\") self.timeout = timeout self.access_token = get_access_token() def _headers(self) -> dict: return { \"Authorization\": f\"Bearer {self.access_token}\" if self.access_token else \"\", \"Content-Type\": \"application/json; charset=utf-8\", } @observe def _request(self, method: str, path: str, params: dict | None = None, json: dict | None = None) -> dict: try: url = f\"{self.base_url}{path}\" resp = requests.request(method, url, headers=self._headers(), params=params, json=json, timeout=self.timeout) resp_data = resp.json() except requests.exceptions.RequestException as e: raise Exception(f\"FeishuBitable API request error: {e}\") if resp_data.get(\"code\") != 0: raise Exception(f\"FeishuBitable API error: {resp_data}\") return resp_data @require_token def create_base(self, name: str | None = None, folder_token: str | None = None, time_zone: str | None = None) -> dict: """ 创建多维表格 Base 接口:POST `/bitable/v1/apps` 入参(JSON): - `name`: Base 名称,最长 255 字符,可选 - `folder_token`: 归属文件夹 Token,可选,需具备该目录的编辑权限 - `time_zone`: 文档时区,如 `Asia/Macau`,可选 出参(data): - Base 基础信息,包含 `app_token`、`name`、创建时间等 限制:复制中的 Base 无法操作;写接口不支持并发。 """ body: dict = {} if name is not None: body[\"name\"] = name if folder_token is not None: body[\"folder_token\"] = folder_token if time_zone is not None: body[\"time_zone\"] = time_zone return self._request(\"POST\", \"/bitable/v1/apps\", json=body) @require_token def get_base_info(self, app_token: str) -> dict: """ 获取 Base 信息 接口:GET `/bitable/v1/apps/:app_token` 入参(路径): - `app_token`: Base 的唯一标识 出参(data): - Base 元信息:`app_token`、`name`、概览数据等 """ return self._request(\"GET\", f\"/bitable/v1/apps/{app_token}\") @require_token def list_tables(self, app_token: str, page_token: str | None = None, page_size: int | None = None) -> dict: """ 列出 Base 下所有数据表 接口:GET `/bitable/v1/apps/:app_token/tables` 入参(路径): - `app_token` 入参(查询): - `page_token`: 分页标记,可选 - `page_size`: 分页大小,默认 20,最大 100,可选 出参(data): - 数据表列表,包含 `table_id`、`revision`(版本号)、`name`(名称) - 可能包含分页信息,如 `page_token`、`has_more` """ params: dict = {} if page_token is not None: params[\"page_token\"] = page_token if page_size is not None: params[\"page_size\"] = page_size return self._request(\"GET\", f\"/bitable/v1/apps/{app_token}/tables\", params=params) @require_token def create_table(self, app_token: str, table_name: str, fields: list | None = None) -> dict: """ 创建数据表 接口:POST `/bitable/v1/apps/:app_token/tables` 入参(路径): - `app_token` 入参(JSON): - `table_name`: 表名称(必填) - `fields[]`: 初始字段定义列表(可选),每项包含: - `field_name`(名称)、`type`(类型:1 文本、2 数字、3 单选、4 多选、5 日期 等) - 可选 `property`、`description`、`ui_type` 出参(data): - 新建表对象,包含 `table_id`、`name`、初始字段列表 """ body: dict = {\"table_name\": table_name} if fields is not None: body[\"fields\"] = fields return self._request(\"POST\", f\"/bitable/v1/apps/{app_token}/tables\", json=body) @require_token def delete_tables(self, app_token: str, table_ids: list[str] | str) -> dict: """ 批量删除数据表 接口:POST `/bitable/v1/apps/:app_token/tables/batch_delete` 入参(路径): - `app_token` 入参(JSON): - `table_ids[]`: 待删除的表 ID 列表(最多 50) 出参(data): - 执行结果;当仅剩最后一张数据表时返回错误(`The last table cannot be deleted`) 限制:写接口不支持并发;复制中的 Base 无法操作。 """ ids = table_ids if isinstance(table_ids, list) else [table_ids] body = {\"table_ids\": ids} return self._request(\"POST\", f\"/bitable/v1/apps/{app_token}/tables/batch_delete\", json=body) @require_token def list_fields( self, app_token: str, table_id: str, view_id: str | None = None, text_field_as_array: bool | None = None, page_token: str | None = None, page_size: int | None = None, ) -> dict: """ 列出数据表字段 接口:GET `/bitable/v1/apps/:app_token/tables/:table_id/fields` 入参(路径): - `app_token`、`table_id` 入参(查询): - `view_id`: 视图 ID(当使用 filter/sort 时忽略),可选 - `text_field_as_array`: `description` 是否以数组返回,默认 false,可选 - `page_token`: 分页标记,可选 - `page_size`: 分页大小,默认 20,最大 100,可选 出参(data): - 字段列表 `fields[]`,每项包含: - `field_id`、`field_name`、`type`、`property`、`description`、`ui_type` """ params: dict = {} if view_id is not None: params[\"view_id\"] = view_id if text_field_as_array is not None: params[\"text_field_as_array\"] = text_field_as_array if page_token is not None: params[\"page_token\"] = page_token if page_size is not None: params[\"page_size\"] = page_size return self._request(\"GET\", f\"/bitable/v1/apps/{app_token}/tables/{table_id}/fields\", params=params) @require_token def add_field(self, app_token: str, table_id: str, field: dict, client_token: str | None = None) -> dict: """ 新增字段 接口:POST `/bitable/v1/apps/:app_token/tables/:table_id/fields` 入参(路径): - `app_token`、`table_id` 入参(查询): - `client_token`: 幂等操作标识(UUIDv4),可选 入参(JSON): - `field_name`(必填)、`type`(必填) - 可选 `property`、`description`、`ui_type` 出参(data): - 新增的字段对象,含 `field_id`、`type`、`property` 等 注意:不支持新增类型 `19 查找引用`。 """ params = {} if client_token is not None: params[\"client_token\"] = client_token return self._request(\"POST\", f\"/bitable/v1/apps/{app_token}/tables/{table_id}/fields\", params=params, json=field) @require_token def update_field(self, app_token: str, table_id: str, field_id: str, field: dict) -> dict: """ 更新字段(全量覆盖) 接口:PUT `/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id` 入参(路径): - `app_token`、`table_id`、`field_id` 入参(JSON): - 与新增字段结构一致;为全量更新,`property` 等会被完全覆盖 出参(data): - 更新后的字段对象 """ return self._request(\"PUT\", f\"/bitable/v1/apps/{app_token}/tables/{table_id}/fields/{field_id}\", json=field) @require_token def delete_field(self, app_token: str, table_id: str, field_id: str) -> dict: """ 删除字段 接口:DELETE `/bitable/v1/apps/:app_token/tables/:table_id/fields/:field_id` 入参(路径): - `app_token`、`table_id`、`field_id` 出参(data): - 执行结果 """ return self._request(\"DELETE\", f\"/bitable/v1/apps/{app_token}/tables/{table_id}/fields/{field_id}\") @require_token def add_records( self, app_token: str, table_id: str, records: list, user_id_type: str | None = None, client_token: str | None = None, ignore_consistency_check: bool | None = None, ) -> dict: """ 批量新增记录 接口:POST `/bitable/v1/apps/:app_token/tables/:table_id/records/batch_create` 入参(路径): - `app_token`、`table_id` 入参(查询): - `user_id_type`: 用户 ID 类型(`open_id`/`union_id`/`user_id`),默认 `open_id` - `client_token`: 幂等操作标识(UUIDv4),可选 - `ignore_consistency_check`: 是否忽略读写一致性检查,默认 false,可选 入参(JSON): - `records[]`: 记录列表,单次最多 1,000 条;每条形如: - `{ \"fields\": { \"字段名\": 值, ... } }` 出参(data): - 创建成功的记录集合,包含 `record_id`、`fields` 等 限制:来自外部数据源同步的表不支持增删改;同表写接口不支持并发。 """ params: dict = {} if user_id_type is not None: params[\"user_id_type\"] = user_id_type if client_token is not None: params[\"client_token\"] = client_token if ignore_consistency_check is not None: params[\"ignore_consistency_check\"] = ignore_consistency_check body = {\"records\": records} return self._request(\"POST\", f\"/bitable/v1/apps/{app_token}/tables/{table_id}/records/batch_create\", params=params, json=body) @require_token def update_records( self, app_token: str, table_id: str, records: list, user_id_type: str | None = None, ignore_consistency_check: bool | None = None, ) -> dict: """ 批量更新记录 接口:POST `/bitable/v1/apps/:app_token/tables/:table_id/records/batch_update` 入参(路径): - `app_token`、`table_id` 入参(查询): - `user_id_type`: 用户 ID 类型,可选 - `ignore_consistency_check`: 是否忽略读写一致性检查,可选 入参(JSON): - `records[]`: 更新列表,单次最多 1,000 条;每条包含: - `record_id`: 记录 ID(必填) - `fields`: 需更新的字段键值对 出参(data): - 更新后的记录集合 限制:来自外部数据源同步的表不支持增删改;同表写接口不支持并发。 """ params: dict = {} if user_id_type is not None: params[\"user_id_type\"] = user_id_type if ignore_consistency_check is not None: params[\"ignore_consistency_check\"] = ignore_consistency_check body = {\"records\": records} return self._request(\"POST\", f\"/bitable/v1/apps/{app_token}/tables/{table_id}/records/batch_update\", params=params, json=body) @require_token def list_records( self, app_token: str, table_id: str, record_ids: list[str] | str, user_id_type: str | None = None, with_shared_url: bool | None = None, automatic_fields: bool | None = None, ) -> dict: """ 批量获取记录 接口:POST `/bitable/v1/apps/:app_token/tables/:table_id/records/batch_get` 入参(路径): - `app_token`、`table_id` 入参(JSON): - `record_ids[]`: 记录 ID 列表,最多 100 条(必填) - `user_id_type`: 用户 ID 类型,可选(`open_id`/`union_id`/`user_id`) - `with_shared_url`: 是否返回记录分享链接,默认 false,可选 - `automatic_fields`: 是否返回自动计算字段,默认 false,可选 出参 : - { \"code\": 0, \"msg\": \"success\", \"data\": { \"records\": [ { \"fields\": { }, \"last_modified_time\": 1702455191000, \"record_id\": \"recyOaMB2F\", \"shared_url\": \"https://example.feishu.cn/record/KBcNrNtpWePAlscCvdmb6ZcSc5b\" } ] } } """ ids = record_ids if isinstance(record_ids, list) else [record_ids] body: dict = {\"record_ids\": ids} if user_id_type is not None: body[\"user_id_type\"] = user_id_type if with_shared_url is not None: body[\"with_shared_url\"] = with_shared_url if automatic_fields is not None: body[\"automatic_fields\"] = automatic_fields return self._request(\"POST\", f\"/bitable/v1/apps/{app_token}/tables/{table_id}/records/batch_get\", json=body) @require_token def batch_get_records( self, app_token: str, table_id: str, record_ids: list[str] | str, user_id_type: str | None = None, with_shared_url: bool | None = None, automatic_fields: bool | None = None, ) -> dict: return self.list_records(app_token, table_id, record_ids, user_id_type, with_shared_url, automatic_fields) @require_token def delete_records(self, app_token: str, table_id: str, record_ids: list[str] | str) -> dict: """ 批量删除记录 接口:POST `/bitable/v1/apps/:app_token/tables/:table_id/records/batch_delete` 入参(路径): - `app_token`、`table_id` 入参(JSON): - `record_ids[]`: 要删除的记录 ID 列表 出参(data): - 执行结果;当存在失败项时,返回对应错误码与原因 限制:来自外部数据源同步的表不支持增删改;同表写接口不支持并发。 """ ids = record_ids if isinstance(record_ids, list) else [record_ids] body = {\"record_ids\": ids} return self._request(\"POST\", f\"/bitable/v1/apps/{app_token}/tables/{table_id}/records/batch_delete\", json=body) @require_token def search_record( self, app_token: str, table_id: str, view_id: str | None = None, field_names: list[str] | None = None, sort: list | None = None, filter: dict | str | None = None, page_token: str | None = None, page_size: int | None = None, user_id_type: str | None = None, ) -> dict: """ 条件查询记录 HTTP 方法:POST 路径:`/bitable/v1/apps/:app_token/tables/:table_id/records/search` 频率限制:20 次/秒 入参(路径参数): - `app_token`: 多维表格 App 的唯一标识 - `table_id`: 数据表的唯一标识 入参(查询参数): - `user_id_type`: 用户 ID 类型,默认 `open_id`;取值 `open_id` / `union_id` / `user_id` - `page_token`: 分页标记;首次不填表示从头开始遍历 - `page_size`: 分页大小,默认 20,最大 500 入参(请求体 JSON): - `view_id`: 视图 ID,可选;当 `filter` 或 `sort` 不为空时忽略 - `field_names`: `string[]`,指定返回记录中包含的字段,可选 - `sort`: `sort[]` 排序条件,可选 - field_name: 字段名称 - desc: 是否降序排序,默认 false - `filter`: 条件筛选, 可选 - `conditions`: 条件数组(最多 20 条),每项包含: - `field_name`: 字段名称或 `field_id` - `operator`: 运算符,随字段类型而异, 可选值有 is, isNot, contains, doesNotContain, isEmpty, isNotEmpty, isGreater, isGreaterEqual, isLess, isLessEqual, like, in - `value`: 值,随字段类型取值 - `conjunction`: 逻辑连接符,`and` 或 `or` 出参(data): - `items[]`: 记录列表(含 `record_id`、`fields`、`last_modified_time` 等) - `page_token`: 下一页标记 - `has_more`: 是否还有更多记录 注意事项: - 若多维表格开启了高级权限,需确保调用身份具备管理权限,否则可能调用成功但返回数据为空。 """ params: dict = {} if user_id_type is not None: params[\"user_id_type\"] = user_id_type if page_token is not None: params[\"page_token\"] = page_token if page_size is not None: params[\"page_size\"] = page_size body: dict = {} if view_id is not None: body[\"view_id\"] = view_id if field_names is not None: body[\"field_names\"] = field_names if sort is not None: body[\"sort\"] = sort if filter is not None: body[\"filter\"] = filter return self._request(\"POST\", f\"/bitable/v1/apps/{app_token}/tables/{table_id}/records/search\", params=params, json=body) @require_token def search_base(self, query: str | None = None, count: int | None = None, offset: str | None = None) -> dict: """ 查找多维表格 接口:POST `/suite/docs-api/search/object` 入参(JSON): - `search_key`: 指定搜索的关键字。 - `count`: 指定搜索返回的文件数量。取值范围为 [0,50]。 - `offset`: 指定搜索的偏移量,该参数最小为 0,即不偏移。该参数的值与返回的文件数量之和不得大于或等于 200(即 offset + count < 200) 出参(data): - 匹配的文档列表 `files[]`,每项含 `token`、`type`、`name` 等;当 `type=bitable` 时表示 Base """ body: dict = {} if query is not None: body[\"search_key\"] = query if count is not None: body[\"count\"] = count if offset is not None: body[\"offset\"] = offset body[\"docs_types\"] = [\"bitable\"] return self._request(\"POST\", \"/suite/docs-api/search/object\", json=body) if __name__ == \"__main__\": client = FeishuBitable() record_ids = client.search_record( app_token=\"WQdQbJnm0aJswrsOfrYciaV0n1e\", table_id=\"tblenvHv3nU9sCfr\", )[\"data\"][\"items\"] record_ids = [record[\"record_id\"] for record in record_ids] # print(record_ids) for record in client.list_records( app_token=\"WQdQbJnm0aJswrsOfrYciaV0n1e\", table_id=\"tblenvHv3nU9sCfr\", record_ids=record_ids, )[\"data\"][\"records\"]: print(record[\"record_id\"], record[\"fields\"]) fields = client.list_fields( app_token=\"WQdQbJnm0aJswrsOfrYciaV0n1e\", table_id=\"tblenvHv3nU9sCfr\", )[\"data\"][\"items\"] print(fields) # 根据 fields 结构插入新记录 client.add_records( app_token=\"WQdQbJnm0aJswrsOfrYciaV0n1e\", table_id=\"tblenvHv3nU9sCfr\", records=[ { \"fields\": { \"文本\": \"新记录\" } } ], ) ```
未来鸟
2026年7月27日 10:55
转发
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
分享
链接
类型
密码
更新密码
有效期
Markdown文件
Word文件
PDF文档(打印)
AI