更新工作表属性
POST
/open-apis/sheets/v2/spreadsheets/{spreadsheetToken}/sheets_batch_update
自建应用商店应用
该接口和 操作工作表 的请求地址相同,但参数不同,调用前请仔细阅读文档。
user_id_type目前默认值为lark_id,2022年1月26日后将会调整默认值为open_id,且不再支持lark_id,请尽快适配!
userIds字段已废弃,2022年1月26日后将不再支持userIds字段,请使用userIDs作为替代。userIDs为需要增加保护范围编辑权限的用户id,id类型由user_id_type字段决定。
userIds字段已废弃,2022年1月26日后将不再支持userIds字段,请使用userIDs作为替代。userIDs为需要增加保护范围编辑权限的用户id,id类型由user_id_type字段决定。
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.feishu.cn/open-apis/sheets/v2/spreadsheets//sheets_batch_update?user_id_type=lark_id' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"requests": [
{
"updateSheet": {
"properties": {
"sheetId": "string",
"title": "string",
"index": "int",
"hidden": "bool",
"frozenColCount": "int",
"frozenRowCount": "int",
"protect": {
"lock": "LOCK",
"lockInfo": "111",
"userIDs": [
"ou_xxxxxxxxxx"
]
}
}
}
}
]
}'
响应示例响应示例
{
"code": 0,
"msg": "Success",
"data": {
"replies": [
{
"updateSheet": {
"properties": {
"sheetId": "string",
"title": "string",
"index": 0,
"hidden": true,
"frozenColCount": 0,
"frozenRowCount": 0,
"protect": {
"lock": "LOCK",
"lockInfo": "",
"userIds": "",
"userIDs": [
"ou_xxxxxxxxx"
]
}
}
}
}
]
}
}
请求参数
Path 参数
spreadsheetToken
string
必需
Query 参数
user_id_type
string
必需
示例值:
lark_id
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8
Body 参数application/json
返回响应
修改于 2023-01-13 05:41:08