服务端 API/云文档/电子表格/筛选视图/筛选条件/获取筛选条件
# 获取筛选条件

获取筛选视图某列的筛选条件信息。

**注意事项**：筛选条件含义参考 [筛选视图的筛选条件指南](https://open.larksuite.com/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/sheets-v3/spreadsheet-sheet-filter_view-condition/filter-view-condition-user-guide)

## 请求

基本 | &nbsp;
---|---
HTTP URL | https://open.larksuite.com/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/:filter_view_id/conditions/:condition_id
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"
filter_view_id | string | 筛选视图 id<br>**示例值**："pH9hbVcCXA"
condition_id | string | 需要查询筛选条件的列字母号<br>**示例值**："E"

```
curl --location --request GET 'https://open.larksuite.com/open-apis/sheets/v3/spreadsheets/shtcnspY6YDVPxWjhG09Qxxxxxx/sheets/phwh0X/filter_views/1234567890/conditions/E' \
--header 'Authorization: Bearer t-40cdeb051222f889f4229de856517992260aa850' \
--header 'Content-Type: application/json'
```

## 响应

### 响应体

名称 | 类型 | 描述
---|---|---
code | int | 错误码，非 0 表示失败
msg | string | 错误描述
data | \- | \-
condition | filter_view_condition | 筛选的条件
condition_id | string | 设置筛选条件的列，使用字母号
filter_type | string | 筛选类型
compare_type | string | 比较类型
expected | string\[\] | 筛选参数

### 响应体示例
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "condition": {
            "condition_id": "E",
            "filter_type": "number",
            "compare_type": "less",
            "expected": [
                "6"
            ]
        }
    }
}
```

### 错误码

HTTP状态码 | 错误码 | 描述 | 排查建议
---|---|---|---
400 | 1310211 | Wrong Sheet Id | 检查 sheet_id
400 | 1310237 | Wrong Filter View Id | 错误的筛选视图 id
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 | 1310223 | Col Id Not Found | 列 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 | 恢复表格后重试

