添加视图
... 2026-2-4 小于 1 分钟
# 添加视图
# 接口说明
本接口用于在 Smartsheet 中的某个子表里添加一个新视图。
# 请求格式
| 描述 | 定义 |
|---|---|
| Path | /openapi/smartsheet/v2/files/{fileID}/sheets/{sheetID}/views |
| Method | POST |
| Content-Type | application/json |
| Accept | application/json |
# 请求头部
详见Headers。
# 请求参数
# 查询参数
无
# 请求体
| 参数名 | 类型 | 必选 | 描述 |
|---|---|---|---|
| addView | JSON Object(AddViewRequest) | 是 | 添加视图请求 |
# 响应参数
# 请求体
| 参数名 | 类型 | 描述 |
|---|---|---|
| addView | JSON Object(AddViewResponse) | 添加视图响应 |
# 请求包体
POST /openapi/smartsheet/v2/files/DAAAAAAAAAAAA/sheets/at5j8y/views HTTP/1.1
Access-Token: ACCESS_TOKEN
Client-Id: CLIENT_ID
Content-Type: application/json
Content-Length: 1
{'addView': {'viewTitle': 'Test Kanban', 'viewType': 2}}
1
2
3
4
5
6
7
2
3
4
5
6
7
1
2
3
4
5
6
7
2
3
4
5
6
7
# 示例
curl --location --request POST 'https://{domain}/openapi/smartsheet/v2/files/DAAAAAAAAAAAA/sheets/at5j8y/views' \
--header 'Access-Token: ACCESS_TOKEN' \
--header 'Client-Id: CLIENT_ID' \
--header 'Content-Type: application/json' \
--data-raw '{
"addView": {
"viewTitle": "Test Kanban",
"viewType": 2
}
}'
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10