aitable-workflow-cli 0.1.25 → 0.1.26-beta.1788853405442
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/templates/_shared/aitable-faq/.kb/state.json +11 -9
- package/templates/_shared/aitable-faq/.kb/wiki/_compile-report.json +10 -25
- package/templates/_shared/aitable-faq/.kb/wiki/_index.md +7 -7
- package/templates/_shared/aitable-faq/.kb/wiki/concepts/AI/350/241/250/346/240/274/344/270/211/346/226/271/346/217/222/344/273/266/344/275/277/347/224/250/346/216/210/346/235/203.md +0 -3
- package/templates/_shared/aitable-faq/.kb/wiki/concepts/AI/350/241/250/346/240/274/346/216/245Qoder/346/231/272/350/203/275/344/275/223/357/274/232/344/273/216/342/200/234/351/227/256/346/225/260/342/200/235/345/210/260/342/200/234/345/212/236/344/272/213/342/200/235.md +182 -0
- package/templates/_shared/aitable-faq/.kb/wiki/concepts/AI/350/241/250/346/240/274/346/217/222/344/273/266-/350/204/232/346/234/254/346/217/222/344/273/266.md +0 -3
- package/templates/_shared/aitable-faq/.kb/wiki/concepts/AI/350/241/250/346/240/274/346/217/222/344/273/266-/350/207/252/345/256/232/344/271/211/346/217/222/344/273/266.md +0 -3
- package/templates/_shared/aitable-faq/.kb/wiki/concepts/_index.md +4 -3
- package/templates/_shared/aitable-faq/.kb/wiki/concepts//346/240/270/345/277/203/347/237/245/350/257/206.md +33 -32
- package/templates/_shared/aitable-faq/.kb/wiki/concepts//350/267/250AI/350/241/250/346/240/274/346/225/260/346/215/256/345/220/214/346/255/245.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/concepts//351/200/217/350/247/206/350/241/250/350/247/206/345/233/276.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/log.md +60 -3
- package/templates/_shared/aitable-faq/.kb/wiki/references/AI /350/241/250/346/240/274 AI /345/255/227/346/256/265/345/270/270/350/247/201/346/212/245/351/224/231/350/257/264/346/230/216.md" +4 -0
- package/templates/_shared/aitable-faq/.kb/wiki/references/AI/350/241/250/346/240/274 (/345/244/232/347/273/264/350/241/250) OpenAPI /345/270/256/345/212/251/346/226/207/346/241/243.md" +151 -119
- package/templates/_shared/aitable-faq/.kb/wiki/references/BarcodeField /346/235/241/347/240/201/345/255/227/346/256/265.md" +2 -0
- package/templates/_shared/aitable-faq/.kb/wiki/references/Base /346/250/241/345/235/227.md" +14 -0
- package/templates/_shared/aitable-faq/.kb/wiki/references/Field /346/250/241/345/235/227.md" +2 -0
- package/templates/_shared/aitable-faq/.kb/wiki/references/Input/346/250/241/345/235/227.md +0 -3
- package/templates/_shared/aitable-faq/.kb/wiki/references/Output/346/250/241/345/235/227.md +0 -3
- package/templates/_shared/aitable-faq/.kb/wiki/references/Record /346/250/241/345/235/227.md" +2 -0
- package/templates/_shared/aitable-faq/.kb/wiki/references/Sheet /346/250/241/345/235/227.md" +7 -0
- package/templates/_shared/aitable-faq/.kb/wiki/references/UI /346/250/241/345/235/227.md" +3 -0
- package/templates/_shared/aitable-faq/.kb/wiki/references/View /346/250/241/345/235/227.md" +3 -0
- package/templates/_shared/aitable-faq/.kb/wiki/references/_index.md +38 -38
- package/templates/_shared/aitable-faq/.kb/wiki/references//344/273/252/350/241/250/347/233/230/345/270/270/350/247/201/351/227/256/351/242/230.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/references//345/205/266/344/273/226/346/216/245/345/217/243.md +0 -3
- package/templates/_shared/aitable-faq/.kb/wiki/references//345/255/227/346/256/265/346/225/260/346/215/256/347/273/223/346/236/204.md +0 -15
- package/templates/_shared/aitable-faq/.kb/wiki/references//350/207/252/345/212/250/345/214/226/345/270/270/350/247/201/351/227/256/351/242/230.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/references//351/253/230/347/272/247/346/235/203/351/231/220/345/270/270/350/247/201/351/227/256/351/242/230.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics/6/350/212/202/350/257/276/345/270/246/344/275/240/345/277/253/351/200/237/344/270/212/346/211/213AI/350/241/250/346/240/274.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics/AI/350/241/250/346/240/274 AI /345/255/227/346/256/265 /345/274/200/345/217/221/346/214/207/345/215/227.md" +4 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics/AI/350/241/250/346/240/274/346/217/222/344/273/266/344/270/255/345/277/203-/344/275/277/347/224/250/346/214/207/345/215/227.md +1 -3
- package/templates/_shared/aitable-faq/.kb/wiki/topics/AI/350/241/250/346/240/274/347/232/204/345/257/274/345/207/272.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics/AI/350/241/250/346/240/274/350/257/257/345/210/240/346/201/242/345/244/215/346/214/207/345/215/227.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics/Dify/346/231/272/350/203/275/344/275/223.md +1 -3
- package/templates/_shared/aitable-faq/.kb/wiki/topics/_index.md +11 -11
- package/templates/_shared/aitable-faq/.kb/wiki/topics//344/270/272/350/241/250/346/240/274/346/267/273/345/212/240/345/255/227/346/256/265.md +0 -4
- package/templates/_shared/aitable-faq/.kb/wiki/topics//344/275/277/347/224/250AI/350/241/250/346/240/274/344/273/252/350/241/250/347/233/230.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics//344/275/277/347/224/250AI/350/241/250/346/240/274/350/247/206/345/233/276.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics//344/275/277/347/224/250AI/350/241/250/346/240/274/351/253/230/347/272/247/346/235/203/351/231/220.md +2 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics//344/275/277/347/224/250/345/205/254/345/274/217/345/255/227/346/256/265.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics//344/275/277/347/224/250/350/207/252/345/212/250/345/214/226/345/267/245/344/275/234/346/265/201.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics//346/231/272/350/203/275/344/275/223/351/227/256/346/225/260/344/270/216/344/277/241/346/201/257/346/224/266/351/233/206/357/275/234/345/212/237/350/203/275/350/257/264/346/230/216.md +111 -150
- package/templates/_shared/aitable-faq/.kb/wiki/topics//351/222/211/351/222/211AI/350/241/250/346/240/274FAQ.md +5 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics//351/222/211/351/222/211AI/350/241/250/346/240/274/345/277/253/351/200/237/344/270/212/346/211/213.md +1 -0
- package/templates/_shared/aitable-faq/.kb/wiki/topics//351/222/211/351/222/211OA/345/256/241/346/211/271/346/225/260/346/215/256/345/220/214/346/255/245.md +1 -0
- package/templates/_shared/aitable-faq/AI/350/241/250/346/240/274/346/216/245Qoder/346/231/272/350/203/275/344/275/223/357/274/232/344/273/216/342/200/234/351/227/256/346/225/260/342/200/235/345/210/260/342/200/234/345/212/236/344/272/213/342/200/235.md +181 -0
- package/templates/_shared/aitable-faq//351/222/211/351/222/211AI/350/241/250/346/240/274FAQ.md +725 -0
|
@@ -1,71 +1,80 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: AI
|
|
2
|
+
title: AI表格(多维表)OpenAPI 帮助文档
|
|
3
3
|
category: references
|
|
4
4
|
sources: [AI表格 (多维表) OpenAPI 帮助文档.md]
|
|
5
|
-
created: 2026-
|
|
6
|
-
updated: 2026-
|
|
7
|
-
tags: [AI表格, OpenAPI,
|
|
8
|
-
aliases: [多维表
|
|
5
|
+
created: 2026-09-04
|
|
6
|
+
updated: 2026-09-04
|
|
7
|
+
tags: [AI表格, 多维表, OpenAPI, 钉钉开放平台, CRUD]
|
|
8
|
+
aliases: [多维表OpenAPI, 钉钉AI表格API, notable API]
|
|
9
9
|
confidence: high
|
|
10
|
-
summary: AI
|
|
10
|
+
summary: 钉钉 AI 表格(多维表)OpenAPI 参考文档,涵盖数据结构(Base/Sheet/Field/Record)、支持的字段类型、Sheet/Field/Record 的 CRUD 接口列表,以及附件上传等常见操作说明。
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
> AI表格 OpenAPI
|
|
13
|
+
> AI 表格 OpenAPI 是钉钉开放平台提供的用于程序化管理 AI 表格(多维表)数据的接口集合,支持对 Sheet(数据表)、Field(字段)、Record(记录)进行完整的增删改查操作。本文档汇总了调用方式、数据结构、字段类型及 API 列表等关键参考信息。
|
|
14
14
|
|
|
15
|
-
> **注意**:AI表格 OpenAPI 已全量发布,完整文档请前往[钉钉开放平台](https://open.dingtalk.com/document/orgapp/notable-data-structure)
|
|
15
|
+
> **注意**:AI 表格 OpenAPI 已全量发布,完整文档请前往 [钉钉开放平台](https://open.dingtalk.com/document/orgapp/notable-data-structure) 查看,本文档不再更新。
|
|
16
16
|
|
|
17
17
|
## 调用方式
|
|
18
18
|
|
|
19
|
-
调用 AI表格 API
|
|
19
|
+
调用 AI 表格 API 前需完成以下准备:
|
|
20
20
|
|
|
21
|
-
1.
|
|
22
|
-
2. **获取 accessToken
|
|
23
|
-
3. **调用 API**:参考[
|
|
21
|
+
1. **添加接口调用权限**:申请「AI 表格应用读权限」及「AI 表格应用写权限」。参考 [添加接口调用权限](https://open.dingtalk.com/document/orgapp/add-api-permission)。
|
|
22
|
+
2. **获取 accessToken**:通过 [获取企业内部应用的 accessToken](https://open.dingtalk.com/document/orgapp/obtain-the-access_token-of-an-internal-app) 接口获取凭证。
|
|
23
|
+
3. **调用 API**:参考 [调用服务端 API](https://open.dingtalk.com/document/orgapp/how-to-call-apis) 及 [钉钉 OpenAPI 概览](https://open.dingtalk.com/document/orgapp/dingtalk-openapi-overview)。
|
|
24
|
+
|
|
25
|
+
**关键约定**:
|
|
26
|
+
|
|
27
|
+
- API 固定前缀:`https://api.dingtalk.com/v1.0/notable/bases/`
|
|
28
|
+
- 所有 API 均需要通过 `operatorId` 参数指定操作用户身份
|
|
29
|
+
- API 调用次数计费遵循 [钉钉开放平台规则](https://open.dingtalk.com/document/orgapp/descriptions-about-adjusting-limit-and-frequency-of-api-calls)
|
|
30
|
+
- API 也可在 [SDK](https://open.dingtalk.com/document/orgapp/sdk-download) 中使用,搜索方法名即可,接口位于 `notable_1.0` 命名空间下
|
|
24
31
|
|
|
25
32
|
## 数据结构
|
|
26
33
|
|
|
27
|
-
AI
|
|
34
|
+
AI 表格包含以下四层基本结构:
|
|
28
35
|
|
|
29
|
-
### Base
|
|
36
|
+
### Base(文档)
|
|
30
37
|
|
|
31
|
-
|
|
38
|
+
Base 代表一篇 AI 表格文档,通过 `baseId` 唯一标识。获取 `baseId` 的方式:
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
**通过 URL 获取**
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+

|
|
36
43
|
|
|
37
|
-
|
|
44
|
+
**通过文档信息面板获取**
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+

|
|
47
|
+

|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
**通过 API 获取**
|
|
50
|
+
|
|
51
|
+
- [知识库 API](https://open.dingtalk.com/document/orgapp/knowledge-base-overview) 返回的 `dentryUuid` 即为 AI 表格的 `baseId`
|
|
43
52
|
- [获取节点](https://open.dingtalk.com/document/orgapp/get-node)
|
|
44
|
-
- [创建知识库文档](https://open.dingtalk.com/document/orgapp/create-team-space-document)(创建 AI表格时 `docType` 值为 `BASE`)
|
|
53
|
+
- [创建知识库文档](https://open.dingtalk.com/document/orgapp/create-team-space-document)(创建 AI 表格时 `docType` 值为 `BASE`)
|
|
45
54
|
|
|
46
|
-
### Sheet
|
|
55
|
+
### Sheet(数据表)
|
|
47
56
|
|
|
48
|
-
|
|
57
|
+
Sheet 代表一张数据表。一篇 AI 表格文档中通常包含多个数据表,且至少有一个。
|
|
49
58
|
|
|
50
|
-
-
|
|
51
|
-
- `sheetId`
|
|
52
|
-
- `sheetName`
|
|
59
|
+
- 可通过 `sheetId` 或 `sheetName` 访问数据表
|
|
60
|
+
- `sheetId` 可通过「获取所有数据表」等接口获取,仅保证在文档内唯一
|
|
61
|
+
- `sheetName` 为前端可见的数据表名称(如 `阅读记录`)
|
|
53
62
|
|
|
54
|
-
### Field
|
|
63
|
+
### Field(字段)
|
|
55
64
|
|
|
56
|
-
|
|
65
|
+
Field 代表数据表中的一列。一个数据表通常有多个字段。
|
|
57
66
|
|
|
58
|
-
-
|
|
59
|
-
- `fieldId`
|
|
60
|
-
- `fieldName`
|
|
61
|
-
-
|
|
67
|
+
- 可通过 `fieldId` 或 `fieldName` 访问字段
|
|
68
|
+
- `fieldId` 可通过「获取所有字段」等接口获取,仅保证在文档内唯一
|
|
69
|
+
- `fieldName` 为前端可见的字段名称(如 `学科领域`)
|
|
70
|
+
- 每个 Sheet 的第一列为「主字段」,仅支持特定几种字段类型,且该列不可删除。可通过打开任意 AI 表格 → 编辑主字段 → 查看可设置的字段类型来确认
|
|
62
71
|
|
|
63
|
-
### Record
|
|
72
|
+
### Record(记录)
|
|
64
73
|
|
|
65
|
-
|
|
74
|
+
Record 代表数据表中的一行。一个数据表通常有多条记录。
|
|
66
75
|
|
|
67
|
-
-
|
|
68
|
-
- `recordId`
|
|
76
|
+
- 所有访问记录的接口需要使用 `recordId`
|
|
77
|
+
- `recordId` 可通过「新增多行记录」「获取多行记录」等接口获取,仅保证在文档内唯一
|
|
69
78
|
|
|
70
79
|

|
|
71
80
|
|
|
@@ -73,94 +82,81 @@ AI表格包含以下基本结构:
|
|
|
73
82
|
|
|
74
83
|
目前仅支持以下字段类型:
|
|
75
84
|
|
|
76
|
-
| 字段 | 类型 (type) |
|
|
77
|
-
|
|
78
|
-
| 文本 | `text` |
|
|
79
|
-
| 数字 | `number` | `
|
|
80
|
-
| 货币 | `currency` | `
|
|
81
|
-
| 单选 | `singleSelect` | `
|
|
82
|
-
| 多选 | `multipleSelect` |
|
|
83
|
-
| 日期 | `date` | `
|
|
84
|
-
| 人员 | `user` | `{
|
|
85
|
-
| 部门 | `department` | `{
|
|
86
|
-
| 群组 | `group` | `{
|
|
87
|
-
| 附件 | `attachment` |
|
|
88
|
-
| 单向关联 | `unidirectionalLink` | `{
|
|
89
|
-
| 双向关联 | `bidirectionalLink` | `{
|
|
90
|
-
| 链接 | `url` |
|
|
91
|
-
| 富文本 | `richText` |
|
|
92
|
-
| 地理位置 | `geolocation` |
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
85
|
+
| 字段 | 类型 (type) | 设置值格式 | 返回值格式 |
|
|
86
|
+
| --- | --- | --- | --- |
|
|
87
|
+
| 文本 | `text` | `"TextString"`(字符串) | `"TextString"`(字符串) |
|
|
88
|
+
| 数字 | `number` | `123`(整数/浮点数/字符串) | `"123"`(字符串形式) |
|
|
89
|
+
| 货币 | `currency` | `123`(整数/浮点数/字符串),需指定 `currencyType` | `"123"`(字符串形式) |
|
|
90
|
+
| 单选 | `singleSelect` | `"optionName1"`(选项名) | `{ "id": "id", "name": "optionName1" }` |
|
|
91
|
+
| 多选 | `multipleSelect` | `["optionName1", "optionName2"]` | `[{ "id": "id1", "name": "optionName1" }, ...]` |
|
|
92
|
+
| 日期 | `date` | `1688601600000`(时间戳)或 ISO 8601 字符串 | `1688601600000`(时间戳) |
|
|
93
|
+
| 人员 | `user` | `[{ "unionId": "xxx" }]` | `[{ "unionId": "xxx" }]` |
|
|
94
|
+
| 部门 | `department` | `[{ "deptId": "xxx" }]` | `[{ "deptId": "xxx" }]` |
|
|
95
|
+
| 群组 | `group` | `[{ "openConversationId": "xxx" }]` | `[{ "openConversationId": "xxx" }]` |
|
|
96
|
+
| 附件 | `attachment` | 需先通过资源上传接口获取 | `[{ "filename": "...", "size": ..., "url": "..." }]` |
|
|
97
|
+
| 单向关联 | `unidirectionalLink` | `{ "linkedRecordIds": ["xxx"] }` | `{ "linkedRecordIds": ["xxx"] }` |
|
|
98
|
+
| 双向关联 | `bidirectionalLink` | `{ "linkedRecordIds": ["xxx"] }` | `{ "linkedRecordIds": ["xxx"] }` |
|
|
99
|
+
| 链接 | `url` | `{ "text": "...", "link": "..." }` | `{ "text": "...", "link": "..." }` |
|
|
100
|
+
| 富文本 | `richText` | `{ "markdown": "..." }` | `{ "markdown": "..." }` |
|
|
101
|
+
| 地理位置 | `geolocation` | `{ "address": "...", "name": "...", "location": [...] }` | `{ "address": "...", "name": "...", "location": [...] }` |
|
|
102
|
+
|
|
103
|
+
**字段配置说明**:
|
|
104
|
+
|
|
105
|
+
- **数字**:支持 `INT`(整数)、`FLOAT_1`~`FLOAT_4`(保留 1-4 位小数)、`THOUSAND`(千分位)、`THOUSAND_FLOAT`、`PERCENT`(百分比)、`PERCENT_FLOAT` 等格式
|
|
106
|
+
- **货币**:额外支持 CNY、HKD、USD、EUR、GBP、JPY、KRW 等多种货币类型
|
|
107
|
+
- **日期**:支持 `YYYY-MM-DD`、`YYYY-MM-DD HH:mm`、`YYYY/MM/DD`、`YYYY/MM/DD HH:mm` 四种显示格式
|
|
108
|
+
- **人员/部门/群组**:通过 `multiple` 属性控制是否支持多选,默认为 `true`
|
|
109
|
+
- **单向关联**:需指定 `linkedSheetId`(关联的数据表 ID);可通过关联的 `sheetId` + `recordId` 调用 `GetRecord` 获取关联记录的值
|
|
110
|
+
- **双向关联**:需指定 `linkedSheetId`,创建时不需传 `linkedFieldId`(由系统自动生成)
|
|
111
|
+
|
|
112
|
+
**注意事项**:
|
|
113
|
+
|
|
114
|
+
- 富文本字段通过 markdown 读取后的值是有损的,颜色、字体样式、@人等信息会丢失
|
|
115
|
+
- 附件字段返回的 `url`:当附件是在线文档时,链接无访问时效;当附件为其他文件时,链接具有访问时效,一段时间后无法访问
|
|
97
116
|
|
|
98
117
|
## API 列表
|
|
99
118
|
|
|
100
|
-
|
|
101
|
-
> 1. API 固定前缀为 `https://api.dingtalk.com/v1.0/notable/bases/`,以下省略,调用时需自行添加。
|
|
102
|
-
> 2. 所有 API 需通过 query 中的 `operatorId` 参数指定调用用户身份。
|
|
103
|
-
> 3. 调用次数计费遵循[钉钉开放平台规则](https://open.dingtalk.com/document/orgapp/descriptions-about-adjusting-limit-and-frequency-of-api-calls)。
|
|
104
|
-
>
|
|
105
|
-
> API 也可在[钉钉开放平台 SDK](https://open.dingtalk.com/document/orgapp/sdk-download) 中使用,搜索方法名即可(如搜索 `CreateSheet`)。接口位于 `notable_1.0` 命名空间下。
|
|
106
|
-
|
|
107
|
-
### 数据表
|
|
108
|
-
|
|
109
|
-
| API | 方法 | 路径 |
|
|
110
|
-
|-----|------|------|
|
|
111
|
-
| 创建数据表 CreateSheet | POST | `{baseId}/sheets?operatorId={operatorId}` |
|
|
112
|
-
| 获取所有数据表 GetAllSheets | GET | `{baseId}/sheets?operatorId={operatorId}` |
|
|
113
|
-
| 获取数据表 GetSheet | GET | `{baseId}/sheets/{sheetId}?operatorId={operatorId}` |
|
|
114
|
-
| 更新数据表 UpdateSheet | PUT | `{baseId}/sheets/{sheetIdOrName}?operatorId={operatorId}` |
|
|
115
|
-
| 删除数据表 DeleteSheet | DELETE | `{baseId}/sheets/{sheetIdOrName}?operatorId={operatorId}` |
|
|
119
|
+
### 数据表 API
|
|
116
120
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
{
|
|
123
|
-
|
|
124
|
-
"fields": [
|
|
125
|
-
{ "name": "Field1", "type": "text" },
|
|
126
|
-
{ "name": "Field2", "type": "number" }
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
```
|
|
121
|
+
| API 名 | 方法 | 路径 |
|
|
122
|
+
| --- | --- | --- |
|
|
123
|
+
| 创建数据表 CreateSheet | `POST` | `{baseId}/sheets` |
|
|
124
|
+
| 获取所有数据表 GetAllSheets | `GET` | `{baseId}/sheets` |
|
|
125
|
+
| 获取数据表 GetSheet | `GET` | `{baseId}/sheets/{sheetId}` |
|
|
126
|
+
| 更新数据表 UpdateSheet | `PUT` | `{baseId}/sheets/{sheetIdOrName}` |
|
|
127
|
+
| 删除数据表 DeleteSheet | `DELETE` | `{baseId}/sheets/{sheetIdOrName}` |
|
|
130
128
|
|
|
131
|
-
### 字段
|
|
129
|
+
### 字段 API
|
|
132
130
|
|
|
133
|
-
| API | 方法 | 路径 |
|
|
134
|
-
|
|
135
|
-
| 新增字段 CreateField | POST | `{baseId}/sheets/{sheetIdOrName}/fields
|
|
136
|
-
| 获取所有字段 GetAllFields | GET | `{baseId}/sheets/{sheetIdOrName}/fields
|
|
137
|
-
| 更新字段 UpdateField | PUT | `{baseId}/sheets/{sheetIdOrName}/fields/{fieldIdOrName}
|
|
138
|
-
| 删除字段 DeleteField | DELETE | `{baseId}/sheets/{sheetIdOrName}/fields/{fieldIdOrName}
|
|
131
|
+
| API 名 | 方法 | 路径 |
|
|
132
|
+
| --- | --- | --- |
|
|
133
|
+
| 新增字段 CreateField | `POST` | `{baseId}/sheets/{sheetIdOrName}/fields` |
|
|
134
|
+
| 获取所有字段 GetAllFields | `GET` | `{baseId}/sheets/{sheetIdOrName}/fields` |
|
|
135
|
+
| 更新字段 UpdateField | `PUT` | `{baseId}/sheets/{sheetIdOrName}/fields/{fieldIdOrName}` |
|
|
136
|
+
| 删除字段 DeleteField | `DELETE` | `{baseId}/sheets/{sheetIdOrName}/fields/{fieldIdOrName}` |
|
|
139
137
|
|
|
140
|
-
>
|
|
138
|
+
> **Q:为什么返回的字段数量不全?** 目前只返回支持的字段类型,具体参考上方字段类型列表。
|
|
141
139
|
>
|
|
142
|
-
>
|
|
140
|
+
> **Q:为什么返回的字段顺序和界面看到的顺序不同?** AI 表格中数据表是无序的,只有视图才有序。目前暂不支持基于视图获取所有字段。
|
|
143
141
|
|
|
144
|
-
### 记录
|
|
142
|
+
### 记录 API
|
|
145
143
|
|
|
146
|
-
| API | 方法 | 路径 |
|
|
147
|
-
|
|
148
|
-
| 新增多行记录 InsertRecords | POST | `{baseId}/sheets/{sheetIdOrName}/records
|
|
149
|
-
| 列出多行记录 ListRecords | POST | `{baseId}/sheets/{sheetIdOrName}/records/list
|
|
150
|
-
| 获取记录 GetRecord | GET | `{baseId}/sheets/{sheetIdOrName}/records/{recordId}
|
|
151
|
-
| 更新多行记录 UpdateRecords | PUT | `{baseId}/sheets/{sheetIdOrName}/records
|
|
152
|
-
| 删除多条记录 DeleteRecords | POST | `{baseId}/sheets/{sheetIdOrName}/records/delete
|
|
144
|
+
| API 名 | 方法 | 路径 |
|
|
145
|
+
| --- | --- | --- |
|
|
146
|
+
| 新增多行记录 InsertRecords | `POST` | `{baseId}/sheets/{sheetIdOrName}/records` |
|
|
147
|
+
| 列出多行记录 ListRecords | `POST` | `{baseId}/sheets/{sheetIdOrName}/records/list` |
|
|
148
|
+
| 获取记录 GetRecord | `GET` | `{baseId}/sheets/{sheetIdOrName}/records/{recordId}` |
|
|
149
|
+
| 更新多行记录 UpdateRecords | `PUT` | `{baseId}/sheets/{sheetIdOrName}/records` |
|
|
150
|
+
| 删除多条记录 DeleteRecords | `POST` | `{baseId}/sheets/{sheetIdOrName}/records/delete` |
|
|
153
151
|
|
|
154
|
-
|
|
152
|
+
**InsertRecords 示例**:
|
|
155
153
|
|
|
156
154
|
```json
|
|
157
|
-
POST {baseId}/sheets/{sheetIdOrName}/records?operatorId={operatorId}
|
|
158
|
-
BODY
|
|
159
155
|
{
|
|
160
156
|
"records": [
|
|
161
157
|
{
|
|
162
158
|
"fields": {
|
|
163
|
-
"多行文本": "
|
|
159
|
+
"多行文本": "多行文本内容",
|
|
164
160
|
"数字": 100,
|
|
165
161
|
"单选": "选项1",
|
|
166
162
|
"多选": ["选项1", "选项2"]
|
|
@@ -168,7 +164,7 @@ BODY
|
|
|
168
164
|
},
|
|
169
165
|
{
|
|
170
166
|
"fields": {
|
|
171
|
-
"多行文本": "
|
|
167
|
+
"多行文本": "多行文本内容_",
|
|
172
168
|
"数字": 101,
|
|
173
169
|
"单选": "选项2",
|
|
174
170
|
"多选": ["选项1"]
|
|
@@ -178,26 +174,34 @@ BODY
|
|
|
178
174
|
}
|
|
179
175
|
```
|
|
180
176
|
|
|
181
|
-
|
|
177
|
+
其中 `records` 是数组,每个元素代表一行;`fields` 为 key-value pair,key 是字段 ID 或字段名,value 是要填入的值(格式与字段类型相关)。
|
|
182
178
|
|
|
183
|
-
|
|
179
|
+
**ListRecords 说明**:
|
|
180
|
+
|
|
181
|
+
- 支持分页:`maxResults` 每次拉取行数最大 100,`nextToken` 用于翻页
|
|
182
|
+
- 特定情况下可能返回空数组,只要 `hasMore` 为 `true` 说明数据未拉完,需继续请求
|
|
183
|
+
- 返回包含记录的 `fields`、`createdBy`、`lastModifiedBy`、`createdTime`、`lastModifiedTime`
|
|
184
|
+
|
|
185
|
+
> **Q:为什么返回的记录顺序和界面看到的顺序不同?** 数据表是无序的,只有视图才有序。目前暂不支持基于视图获取所有记录。
|
|
184
186
|
|
|
185
187
|
## 常见问题
|
|
186
188
|
|
|
187
|
-
### Q:如何创建 AI表格?
|
|
189
|
+
### Q:如何创建 AI 表格?
|
|
188
190
|
|
|
189
|
-
使用[创建知识库文档接口](https://open.dingtalk.com/document/orgapp/create-team-space-document),`docType` 传 `BASE`。
|
|
191
|
+
使用 [创建知识库文档接口](https://open.dingtalk.com/document/orgapp/create-team-space-document),`docType` 传 `BASE`。
|
|
190
192
|
|
|
191
|
-
### Q:如何调整 AI表格权限?
|
|
193
|
+
### Q:如何调整 AI 表格权限?
|
|
192
194
|
|
|
193
|
-
|
|
195
|
+
AI 表格文档权限请使用 [权限管理接口](https://open.dingtalk.com/document/orgapp/add-permissions-file) 访问。AI 表格高级权限暂不支持 API 访问。
|
|
194
196
|
|
|
195
197
|
### Q:如何上传附件?
|
|
196
198
|
|
|
197
|
-
|
|
199
|
+
上传附件需要 3 步:
|
|
198
200
|
|
|
199
201
|
**第 1 步:获取资源上传信息**
|
|
200
202
|
|
|
203
|
+
权限点:企业存储文件写权限。
|
|
204
|
+
|
|
201
205
|
```http
|
|
202
206
|
POST /v1.0/doc/docs/resources/{documentId}/uploadInfos/query?operatorId=String HTTP/1.1
|
|
203
207
|
Host: api.dingtalk.com
|
|
@@ -205,7 +209,35 @@ x-acs-dingtalk-access-token: String
|
|
|
205
209
|
Content-Type: application/json
|
|
206
210
|
```
|
|
207
211
|
|
|
208
|
-
|
|
212
|
+
请求参数:
|
|
213
|
+
|
|
214
|
+
| 名称 | 类型 | 必填 | 描述 |
|
|
215
|
+
| --- | --- | --- | --- |
|
|
216
|
+
| documentId (Path) | String | 是 | 文档唯一标识,即 baseId/dentryUuid |
|
|
217
|
+
| operatorId (Query) | String | 是 | 操作用户 unionId |
|
|
218
|
+
| size (Body) | Long | 是 | 资源大小 |
|
|
219
|
+
| mediaType (Body) | String | 是 | [mimeType](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Guides/MIME_types/Common_types) |
|
|
220
|
+
| resourceName (Body) | String | 是 | 资源名称 |
|
|
221
|
+
|
|
222
|
+
返回参数:
|
|
223
|
+
|
|
224
|
+
| 名称 | 类型 | 描述 |
|
|
225
|
+
| --- | --- | --- |
|
|
226
|
+
| uploadUrl | String | 资源上传地址 |
|
|
227
|
+
| resourceId | String | 资源 ID |
|
|
228
|
+
| resourceUrl | String | 资源访问 URL |
|
|
229
|
+
|
|
230
|
+
返回示例:
|
|
231
|
+
|
|
232
|
+
```json
|
|
233
|
+
{
|
|
234
|
+
"result": {
|
|
235
|
+
"resourceId": "6c6a466c-6a52-4aa0-a80f-13896e635145",
|
|
236
|
+
"uploadUrl": "https://alidocs2.oss-cn-zhangjiakou.aliyuncs.com/res/..."
|
|
237
|
+
},
|
|
238
|
+
"success": true
|
|
239
|
+
}
|
|
240
|
+
```
|
|
209
241
|
|
|
210
242
|
**第 2 步:上传文件到 uploadUrl**
|
|
211
243
|
|
|
@@ -213,7 +245,7 @@ Body 参数:`size`(资源大小)、`mediaType`(mimeType)、`resourceNa
|
|
|
213
245
|
curl -X PUT -H "Content-Type: image/jpeg" --data-binary @/path/to/your/image.jpg {uploadUrl}
|
|
214
246
|
```
|
|
215
247
|
|
|
216
|
-
**第 3
|
|
248
|
+
**第 3 步:调用新增/更新多行记录接口写入 AI 表格**
|
|
217
249
|
|
|
218
250
|
```json
|
|
219
251
|
[
|
|
@@ -233,7 +265,7 @@ curl -X PUT -H "Content-Type: image/jpeg" --data-binary @/path/to/your/image.jpg
|
|
|
233
265
|
|
|
234
266
|
- [字段数据结构](./字段数据结构.md)
|
|
235
267
|
- [其他接口](./其他接口.md)
|
|
236
|
-
- [
|
|
268
|
+
- [常见问题](./常见问题.md)
|
|
237
269
|
|
|
238
270
|
## Sources
|
|
239
271
|
|
|
@@ -49,6 +49,8 @@ if (Base.isFieldOfType(barcodeField, 'barcode')) {
|
|
|
49
49
|
|
|
50
50
|
- [Base 模块 API 参考](../references/Base%20模块.md)
|
|
51
51
|
- [AutoNumberField 自动编号字段 API](../references/AutoNumberField%20自动编号字段.md)
|
|
52
|
+
- [[AttachmentField 附件字段|AttachmentField 附件字段 API]] ([AttachmentField 附件字段 API](<../references/AttachmentField 附件字段.md>))
|
|
53
|
+
- [[EmailField 邮箱字段|EmailField 邮箱字段 API]] ([EmailField 邮箱字段 API](<../references/EmailField 邮箱字段.md>))
|
|
52
54
|
|
|
53
55
|
## Sources
|
|
54
56
|
|
|
@@ -151,6 +151,20 @@ const hasPermission = await Base.getPermissionAsync({
|
|
|
151
151
|
- [Sheet 模块](../references/Sheet%20模块.md)
|
|
152
152
|
- [读写AI 表格模型](../concepts/读写AI%20表格模型.md)
|
|
153
153
|
- [Field 模块](../references/Field%20模块.md)
|
|
154
|
+
- [[AttachmentField 附件字段|AttachmentField 附件字段 API]] ([AttachmentField 附件字段 API](<../references/AttachmentField 附件字段.md>))
|
|
155
|
+
- [[AutoNumberField 自动编号字段|AutoNumberField 自动编号字段 API]] ([AutoNumberField 自动编号字段 API](<../references/AutoNumberField 自动编号字段.md>))
|
|
156
|
+
- [[BarcodeField 条码字段|BarcodeField 条码字段 API]] ([BarcodeField 条码字段 API](<../references/BarcodeField 条码字段.md>))
|
|
157
|
+
- [[BidirectionalLinkField 双向关联字段|BidirectionalLinkField 双向关联字段 API]] ([BidirectionalLinkField 双向关联字段 API](<../references/BidirectionalLinkField 双向关联字段.md>))
|
|
158
|
+
- [[CheckboxField 复选框字段|CheckboxField 复选框字段 API]] ([CheckboxField 复选框字段 API](<../references/CheckboxField 复选框字段.md>))
|
|
159
|
+
- [[CreatedTimeField 创建时间字段|CreatedTimeField 创建时间字段 API]] ([CreatedTimeField 创建时间字段 API](<../references/CreatedTimeField 创建时间字段.md>))
|
|
160
|
+
- [[CurrencyField 货币字段|CurrencyField 货币字段 API]] ([CurrencyField 货币字段 API](<../references/CurrencyField 货币字段.md>))
|
|
161
|
+
- [[DateField 日期字段|DateField 日期字段 API]] ([DateField 日期字段 API](<../references/DateField 日期字段.md>))
|
|
162
|
+
- [[DepartmentField 部门字段|DepartmentField 部门字段 API]] ([DepartmentField 部门字段 API](<../references/DepartmentField 部门字段.md>))
|
|
163
|
+
- [[EmailField 邮箱字段|EmailField 邮箱字段 API]] ([EmailField 邮箱字段 API](<../references/EmailField 邮箱字段.md>))
|
|
164
|
+
- [[Event事件模块|Event 事件模块 API 参考]] ([Event 事件模块 API 参考](../references/Event事件模块.md))
|
|
165
|
+
- [[Input模块|Input 模块 API 参考]] ([Input 模块 API 参考](../references/Input模块.md))
|
|
166
|
+
- [[UI 模块|UI 模块 API 参考]] ([UI 模块 API 参考](<../references/UI 模块.md>))
|
|
167
|
+
- [[AI表格脚本插件 开发指南|AI 表格脚本插件开发指南]] ([AI 表格脚本插件开发指南](<../topics/AI表格脚本插件 开发指南.md>))
|
|
154
168
|
|
|
155
169
|
## Sources
|
|
156
170
|
|
package/templates/_shared/aitable-faq/.kb/wiki/references/Field /346/250/241/345/235/227.md"
CHANGED
|
@@ -110,6 +110,8 @@ const format = numberField.getFormat();
|
|
|
110
110
|
- [Sheet 模块](../references/Sheet%20模块.md)
|
|
111
111
|
- [字段数据结构](../references/字段数据结构.md)
|
|
112
112
|
- [Record 模块](../references/Record%20模块.md)
|
|
113
|
+
- [[读写AI 表格模型|读写 AI 表格模型]] ([读写 AI 表格模型](<../concepts/读写AI 表格模型.md>))
|
|
114
|
+
- [[Base 模块|Base 模块 API 参考]] ([Base 模块 API 参考](<../references/Base 模块.md>))
|
|
113
115
|
|
|
114
116
|
## Sources
|
|
115
117
|
|
|
@@ -104,9 +104,6 @@ const name = await Input.textAsync('请输入名称', {
|
|
|
104
104
|
- [AI表格脚本插件 开发指南](../topics/AI表格脚本插件%20开发指南.md)
|
|
105
105
|
- [Base 模块](../references/Base%20模块.md)
|
|
106
106
|
- [[AI表格脚本插件 开发指南|AI 表格脚本插件开发指南]] ([AI 表格脚本插件开发指南](<../topics/AI表格脚本插件 开发指南.md>))
|
|
107
|
-
- [[AI表格脚本插件 开发指南|AI 表格脚本插件开发指南]] ([AI 表格脚本插件开发指南](<../topics/AI表格脚本插件 开发指南.md>))
|
|
108
|
-
- [[AI表格脚本插件 开发指南|AI 表格脚本插件开发指南]] ([AI 表格脚本插件开发指南](<../topics/AI表格脚本插件 开发指南.md>))
|
|
109
|
-
- [[AI表格脚本插件 开发指南|AI 表格脚本插件开发指南]] ([AI 表格脚本插件开发指南](../topics/AI表格脚本插件 开发指南.md))
|
|
110
107
|
|
|
111
108
|
## Sources
|
|
112
109
|
|
|
@@ -91,9 +91,6 @@ Output.log('面板已清空');
|
|
|
91
91
|
- [Input模块](../references/Input模块.md)
|
|
92
92
|
- [AI表格脚本插件 开发指南](../topics/AI表格脚本插件%20开发指南.md)
|
|
93
93
|
- [[AI表格脚本插件 开发指南|AI 表格脚本插件开发指南]] ([AI 表格脚本插件开发指南](<../topics/AI表格脚本插件 开发指南.md>))
|
|
94
|
-
- [[AI表格脚本插件 开发指南|AI 表格脚本插件开发指南]] ([AI 表格脚本插件开发指南](<../topics/AI表格脚本插件 开发指南.md>))
|
|
95
|
-
- [[AI表格脚本插件 开发指南|AI 表格脚本插件开发指南]] ([AI 表格脚本插件开发指南](<../topics/AI表格脚本插件 开发指南.md>))
|
|
96
|
-
- [[AI表格脚本插件 开发指南|AI 表格脚本插件开发指南]] ([AI 表格脚本插件开发指南](../topics/AI表格脚本插件 开发指南.md))
|
|
97
94
|
|
|
98
95
|
## Sources
|
|
99
96
|
|
package/templates/_shared/aitable-faq/.kb/wiki/references/Record /346/250/241/345/235/227.md"
CHANGED
|
@@ -94,6 +94,8 @@ console.log(`上次更新已过去 ${daysSinceUpdate} 天`);
|
|
|
94
94
|
- [Field 模块](../references/Field%20模块.md)
|
|
95
95
|
- [字段数据结构](../references/字段数据结构.md)
|
|
96
96
|
- [核心知识](../concepts/核心知识.md)
|
|
97
|
+
- [[读写AI 表格模型|读写 AI 表格模型]] ([读写 AI 表格模型](<../concepts/读写AI 表格模型.md>))
|
|
98
|
+
- [[AI表格边栏插件 开发指南|AI 表格边栏插件开发指南]] ([AI 表格边栏插件开发指南](<../topics/AI表格边栏插件 开发指南.md>))
|
|
97
99
|
|
|
98
100
|
## Sources
|
|
99
101
|
|
package/templates/_shared/aitable-faq/.kb/wiki/references/Sheet /346/250/241/345/235/227.md"
CHANGED
|
@@ -215,6 +215,13 @@ await sheet.deleteRecordsAsync(['rec123', 'rec456']);
|
|
|
215
215
|
- [View 模块](../references/View%20模块.md)
|
|
216
216
|
- [Record 模块](../references/Record%20模块.md)
|
|
217
217
|
- [字段数据结构](../references/字段数据结构.md)
|
|
218
|
+
- [[核心知识|AI 表格文档对象模型核心知识]] ([AI 表格文档对象模型核心知识](../concepts/核心知识.md))
|
|
219
|
+
- [[读写AI 表格模型|读写 AI 表格模型]] ([读写 AI 表格模型](<../concepts/读写AI 表格模型.md>))
|
|
220
|
+
- [[Event事件模块|Event 事件模块 API 参考]] ([Event 事件模块 API 参考](../references/Event事件模块.md))
|
|
221
|
+
- [[GridView 表格视图|GridView 表格视图 API 参考]] ([GridView 表格视图 API 参考](<../references/GridView 表格视图.md>))
|
|
222
|
+
- [[UI 模块|UI 模块 API 参考]] ([UI 模块 API 参考](<../references/UI 模块.md>))
|
|
223
|
+
- [[AI表格脚本插件 开发指南|AI 表格脚本插件开发指南]] ([AI 表格脚本插件开发指南](<../topics/AI表格脚本插件 开发指南.md>))
|
|
224
|
+
- [[AI表格边栏插件 开发指南|AI 表格边栏插件开发指南]] ([AI 表格边栏插件开发指南](<../topics/AI表格边栏插件 开发指南.md>))
|
|
218
225
|
|
|
219
226
|
## Sources
|
|
220
227
|
|
|
@@ -163,6 +163,9 @@ if (position.recordId) {
|
|
|
163
163
|
- [Base 模块](../references/Base%20模块.md)
|
|
164
164
|
- [Sheet 模块](../references/Sheet%20模块.md)
|
|
165
165
|
- [View 模块](../references/View%20模块.md)
|
|
166
|
+
- [[Event事件模块|Event 事件模块 API 参考]] ([Event 事件模块 API 参考](../references/Event事件模块.md))
|
|
167
|
+
- [[其他接口|其他接口 API 参考]] ([其他接口 API 参考](../references/其他接口.md))
|
|
168
|
+
- [[AI表格边栏插件 开发指南|AI 表格边栏插件开发指南]] ([AI 表格边栏插件开发指南](<../topics/AI表格边栏插件 开发指南.md>))
|
|
166
169
|
|
|
167
170
|
## Sources
|
|
168
171
|
|
|
@@ -106,6 +106,9 @@ interface FilterInfoCondition {
|
|
|
106
106
|
- [GridView 表格视图](../references/GridView%20表格视图.md)
|
|
107
107
|
- [Sheet 模块](../references/Sheet%20模块.md)
|
|
108
108
|
- [核心知识](../concepts/核心知识.md)
|
|
109
|
+
- [[读写AI 表格模型|读写 AI 表格模型]] ([读写 AI 表格模型](<../concepts/读写AI 表格模型.md>))
|
|
110
|
+
- [[UI 模块|UI 模块 API 参考]] ([UI 模块 API 参考](<../references/UI 模块.md>))
|
|
111
|
+
- [[AI表格边栏插件 开发指南|AI 表格边栏插件开发指南]] ([AI 表格边栏插件开发指南](<../topics/AI表格边栏插件 开发指南.md>))
|
|
109
112
|
|
|
110
113
|
## Sources
|
|
111
114
|
|