# Query filter view

This API is used to query the basic information of all filter views in a sheet, including their IDs, names, and ranges.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/sheets/v3/spreadsheets/:spreadsheet_token/sheets/:sheet_id/filter_views/query
HTTP Method | GET
Rate Limit | [100 per minute](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App、Store App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.**<br>Enable any scope from the list | View, comment, edit, and manage all files in My Space(drive:drive)<br>View, comment, and download all files in My Space(drive:drive:readonly)<br>View, comment, edit, and manage Sheets(sheets:spreadsheet)<br>View, comment, and export Sheets(sheets:spreadsheet:readonly)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>or<br>`user_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer u-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)

### Path parameters

Parameter | Type | Description
---|---|---
spreadsheet_token | string | Spreadsheet token<br>**Example value**: "shtcnmBA*****yGehy8"
sheet_id | string | Sheet ID<br>**Example value**: "0b**12"

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

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
items | filter_view\[\] | Information of all filter views in a sheet, including IDs, names, and ranges
filter_view_id | string | Filter view ID
filter_view_name | string | Filter view name
range | string | Filter view range

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "items": [
            {
                "filter_view_id": "pH9hbVcCXA",
                "filter_view_name": "Filter view 1",
                "range": "0b**12!C1:H14"
            }
        ]
    }
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 1310211 | Wrong Sheet Id | Check the sheet_id.
400 | 1310237 | Wrong Filter View Id | Invalid filter view ID
400 | 1310202 | Wrong Range | Invalid range
400 | 1310229 | Wrong URL Param | Check the url parameter.
400 | 1310213 | Permission Fail | No permission
400 | 1310218 | Locked Cell | Check if the action targets a protected range.
400 | 1310214 | SpreadSheet Not Found | Check the spreadsheet token.
400 | 1310215 | Sheet Id Not Found | Check the sheet_id.
400 | 1310217 | Too Many Request | Check if requests have been sent too frequently.
400 | 1310235 | Retry Later | Please try again later.
500 | 1315201 | Server Error | Internal service error. For more information, [contact support](https://applink.feishu.cn/client/helpdesk/open?id=6626260912531570952)
500 | 1315203 | Server Error | Internal service error. For more information, [contact support](https://applink.feishu.cn/client/helpdesk/open?id=6626260912531570952).
400 | 1310242 | In Mix state | Retey Later
400 | 1310249 | Spreadsheet Deleted | Restore the form and try again

