查询表基本信息
适用版本>=v7.0.2308b.20230824
接口说明:列举sheet下的记录,支持复杂查询条件
请求说明
| 请求地址 | 配置域名+/graph+/v7/wo/api/v3/openapi/office/file/{id}/core/dbt/schemas |
|---|---|
| 请求方法 | GET |
| 签名方式 | WPS-4签名/WPS-4-GM签名(配置域名+/graph不参与签名) |
| 权限要求 | 查询多维表格(用户授权) kso.dbsheet.read |
请求头(Header)
| 名称 | 是否必填 | 说明 |
|---|---|---|
| Content-Type | 是 | 固定为: application/json |
| Wps-Docs-Date | 是 | 取当前时间,示例: Wed,23 Jan 2013 06:43:08 GMT |
| Wps-Docs-Authorization | 是 | 计算方法参考签名说明 |
| Authorization | 是 | 授权凭证,格式为: Bearer {access_token} |
路径参数(Path)
| 名称 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| file_id | string | 是 | 业务方文件id,字符串长度不超过32位。文件id已存在则上传新版本,不存在则为新上传文件 |
响应体(Response)
| 名称 | 类型 | 说明 |
|---|---|---|
| detail | object | 多维表格基本信息返回 |
| ∟ sheets | []object | sheets信息 |
| ∟ ∟ fields | []object | sheet字段信息 |
| ∟ ∟ ∟ id | string | 字段id |
| ∟ ∟ ∟ name | string | 字段名称 |
| ∟ ∟ ∟ type | string | 字段类型 |
| ∟ ∟ ∟ items | []object | 字段选项信息 |
| ∟ ∟ ∟ value | string | 选项值 |
| ∟ ∟ id | integer | sheetid |
| ∟ ∟ name | string | sheet名称 |
| ∟ ∟ primaryFieldId | string | sheet关键字段 |
| ∟ ∟ recordsCount | integer | sheet记录数量 |
| ∟ views | []object | sheet视图 |
| ∟ ∟ id | string | 视图id |
| ∟ ∟ name | string | 视图名称 |
| ∟ ∟ recordsCount | integer | 视图记录数量 |
| ∟ ∟ type | string | 视图类型 |
| result | string | 返回结果 |
响应体示例
{
"detail": {
"sheets": [
{
"fields": [
{
"id": "B",
"name": "名称",
"type": "MultiLineText"
},
{
"id": "C",
"name": "数量",
"type": "Number"
},
{
"id": "D",
"name": "日期",
"type": "Date"
},
{
"id": "E",
"items": [
{
"color": 4283466178,
"id": "B",
"value": "未开始"
},
{
"color": 4281378020,
"id": "C",
"value": "进行中"
},
{
"color": 4278238139,
"id": "D",
"value": "已完成"
}
],
"name": "状态",
"type": "SingleSelect"
}
],
"id": 1,
"name": "测试1",
"primaryFieldId": "B",
"recordsCount": 18,
"views": [
{
"id": "B",
"name": "表格视图",
"recordsCount": 18,
"type": "Grid"
}
]
},
{
"fields": [
{
"id": "B",
"name": "名称",
"type": "MultiLineText"
},
{
"id": "C",
"name": "数量",
"type": "Number"
},
{
"id": "D",
"name": "日期",
"type": "Date"
},
{
"id": "E",
"items": [
{
"color": 4283466178,
"id": "B",
"value": "未开始"
},
{
"color": 4281378020,
"id": "C",
"value": "进行中"
},
{
"color": 4278238139,
"id": "D",
"value": "已完成"
}
],
"name": "状态",
"type": "SingleSelect"
}
],
"id": 3,
"name": "测试2",
"primaryFieldId": "B",
"recordsCount": 18,
"views": [
{
"id": "B",
"name": "表格视图",
"recordsCount": 18,
"type": "Grid"
}
]
}
]
},
"result": "ok"
}