# 参数

> Source: https://strapi.nodejs.cn/cms/api/rest/parameters

🌐 REST API parameters

REST API 参数在 Strapi 查询中用于过滤、排序、分页以及选择字段和关联。使用 `filters`、`locale`、`populate`、`sort` 和 `pagination` 来优化你的内容请求。

🌐 REST API parameters filter, sort, paginate, and select fields and relations in Strapi queries. Use `filters`, `locale`, `populate`, `sort`, and `pagination` to refine your content requests.

API 参数可以与 [REST API](/cms/api/rest) 一起使用，以筛选、排序和分页结果，并选择要填充的字段和关联。此外，还可以使用与可选 Strapi 功能相关的特定参数，例如内容类型的发布状态和语言环境。

🌐 API parameters can be used with the [REST API](/cms/api/rest) to filter, sort, and paginate results and to select fields and relations to populate. Additionally, specific parameters related to optional Strapi features can be used, like the publication state and locale of a content-type.

以下 API 参数可用：

🌐 The following API parameters are available:

| 操作符 | 类型 | 描述 |
| --- | --- | --- |
| `filters` | 对象 | [筛选响应](/cms/api/rest/filters) |
| `locale` | 字符串 | [选择语言环境](/cms/api/rest/locale) |
| `status` | 字符串 | [选择草稿和发布状态](/cms/api/rest/status) |
| `publicationFilter` | 字符串 | [根据草稿和发布版本的关系选择文档](/cms/api/rest/publication-filter) |
| `populate` | 字符串或对象 | [填充关联、组件或动态区域](/cms/api/rest/populate-select#population) |
| `fields` | 数组 | [仅选择要显示的特定字段](/cms/api/rest/populate-select#field-selection) |
| `sort` | 字符串或数组 | [对响应进行排序](/cms/api/rest/sort-pagination.md#sorting) |
| `pagination` | 对象 | [分页获取条目](/cms/api/rest/sort-pagination.md#pagination) |

:::note

参数中的长括号编码列表（例如 `populate` 或 `fields`）受 [`arrayLimit` 在 `strapi::query`](/cms/configurations/middlewares#query) 的限制。参见 [Population](/cms/api/rest/populate-select#population)。

🌐 Long bracket-encoded lists in a parameter (for example `populate` or `fields`) are limited by [`arrayLimit` on `strapi::query`](/cms/configurations/middlewares#query). See [Population](/cms/api/rest/populate-select#population).

:::

查询参数使用 [LHS bracket syntax](https://christiangiacomi.com/posts/rest-design-principles/#lhs-brackets) （即它们使用方括号 `[]` 编码）。

:::tip

可以使用和组合广泛的 REST API 参数来查询你的内容，这可能会导致长且复杂的查询 URL。<br/>👉 你可以使用 Strapi 的[交互式查询构建器](/cms/api/rest/interactive-query-builder)工具更方便地构建查询 URL。🤗

:::
