获取表格元数据
GET
/open-apis/sheets/v2/spreadsheets/{spreadsheetToken}/metainfo
自建应用商店应用
user_id_type目前默认值为lark_id,2022年1月26日后将会调整默认值为open_id,且不再支持lark_id,请尽快适配!
ownerUser字段已废弃,2022年1月26日后将不再返回ownerUser字段,请使用ownerUserID作为替代。ownerUserID为文档所有者的id,id类型由user_id_type决定。
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://open.feishu.cn/open-apis/sheets/v2/spreadsheets//metainfo' \
--header 'Authorization;' \
--header 'Content-Type: text/plain' \
--data-raw 'curl --location --request GET '\''https://open.feishu.cn/open-apis/sheets/v2/spreadsheets/shtcngNygNfuqhxTBf588jwgWbJ/metainfo?extFields=protectedRange&user_id_type=open_id'\'' \
--header '\''Authorization: Bearer t-e346617a4acfc3a11d4ed24dca0d0c0fc8e0067e'\'''
响应示例响应示例
{
"code": 0,
"msg": "Success",
"data": {
"properties": {
"title": "",
"ownerUser": 0,
"sheetCount": 0,
"revision": 0
},
"sheets": [
{
"sheetId": "***",
"title": "***",
"index": 0,
"rowCount": 0,
"columnCount": 0,
"frozenColCount": 0,
"frozenRowCount": 0,
"merges": [
{
"columnCount": 0,
"rowCount": 0,
"startColumnIndex": 0,
"startRowIndex": 0
}
],
"protectedRange": [
{
"dimension": {
"endIndex": 0,
"majorDimension": "ROWS",
"sheetId": "***",
"startIndex": 0
},
"protectId": "***",
"sheetId": "***",
"lockInfo": "***"
}
]
},
{
"blockInfo": {
"blockToken": "***",
"blockType": "***"
},
"columnCount": 0,
"frozenColCount": 0,
"frozenRowCount": 0,
"index": 0,
"rowCount": 0,
"sheetId": "***",
"title": "*** "
}
],
"spreadsheetToken": "***"
}
}
请求参数
Path 参数
spreadsheetToken
string
必需
Query 参数
extFields
string
可选
user_id_type
string
可选
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8
Body 参数text/plain