服务端 API/云文档/电子表格/筛选视图/查询筛选视图
# 查询筛选视图

查询子表内所有的筛选视图基本信息，包括 id、name 和 range

## 请求

基本 | &nbsp;
---|---
HTTP URL | https://open.larksuite.com/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query
HTTP Method | GET
支持的应用类型 | Custom App、Store App
权限要求<br>**调用该 API 所需的权限。开启其中任意一项权限即可调用**<br>开启任一权限即可 | 查看、评论、编辑和管理云空间中所有文件(drive:drive)<br>查看、评论和下载云空间中所有文件(drive:drive:readonly)<br>查看、评论、编辑和管理电子表格(sheets:spreadsheet)<br>查看、评论和导出电子表格(sheets:spreadsheet:readonly)

### 请求头

名称 | 类型 | 必填 | 描述
---|---|---|---
Authorization | string | 是 | `tenant_access_token`<br>或<br>`user_access_token`<br>**值格式**："Bearer `access_token`"<br>**示例值**："Bearer u-7f1bcd13fc57d46bac21793a18e560"<br>[了解更多：获取与使用access_token](https://open.larksuite.com/document/ukTMukTMukTM/uMTNz4yM1MjLzUzM)

### 路径参数

名称 | 类型 | 描述
---|---|---
spreadsheet_token | string | 表格 token<br>**示例值**："shtcnmBA*****yGehy8"
sheet_id | string | 子表 id<br>**示例值**："0b**12"

```
curl --location --request GET 'https://open.larksuite.com/open-apis/sheets/v3/spreadsheets/shtcnspY6YDVPxWjhG09Qxxxxxx/sheets/phwh0X/filter_views/query' \
--header 'Authorization: Bearer t-2602ac1d050a2a308ab8a98639d25cbaaaf26c9f' \
--header 'Content-Type: application/json'
```

## 响应

### 响应体

名称 | 类型 | 描述
---|---|---
code | int | 错误码，非 0 表示失败
msg | string | 错误描述
data | \- | \-
items | filter_view\[\] | 子表的所有筛选视图信息，id、name、range
filter_view_id | string | 筛选视图 id
filter_view_name | string | 筛选视图名字
range | string | 筛选视图的筛选范围

### 响应体示例
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "items": [
            {
                "filter_view_id": "pH9hbVcCXA",
                "filter_view_name": "筛选视图 1",
                "range": "0b**12!C1:H14"
            }
        ]
    }
}
```

### 错误码

HTTP状态码 | 错误码 | 描述 | 排查建议
---|---|---|---
400 | 1310211 | Wrong Sheet Id | 检查 sheet_id
400 | 1310237 | Wrong Filter View Id | 错误的筛选视图 id
400 | 1310202 | Wrong Range | 区域范围错误
400 | 1310229 | Wrong URL Param | 检查 url 参数
400 | 1310213 | Permission Fail | 没有文档相应权限
400 | 1310218 | Locked Cell | 检查操作的是否为保护范围
400 | 1310214 | SpreadSheet Not Found | 检查表格 token
400 | 1310215 | Sheet Id Not Found | 检查 sheet_id
400 | 1310217 | Too Many Request | 检查请求是否发送过于频繁
400 | 1310235 | Retry Later | 稍后重试
500 | 1315201 | Server Error | 服务内部错误，详询客服
500 | 1315203 | Server Error | 服务内部错误，详询客服
400 | 1310242 | In Mix state | Retey Later
400 | 1310249 | Spreadsheet Deleted | 恢复表格后重试

