Skip to content

查询表基本信息

适用版本>=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_idstring业务方文件id,字符串长度不超过32位。文件id已存在则上传新版本,不存在则为新上传文件

响应体(Response)

名称类型说明
detailobject多维表格基本信息返回
sheets[]objectsheets信息
fields[]objectsheet字段信息
idstring字段id
namestring字段名称
typestring字段类型
items[]object字段选项信息
valuestring选项值
idintegersheetid
namestringsheet名称
primaryFieldIdstringsheet关键字段
recordsCountintegersheet记录数量
views[]objectsheet视图
idstring视图id
namestring视图名称
recordsCountinteger视图记录数量
typestring视图类型
resultstring返回结果

响应体示例

{
    "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"
}