文档服务 API:填充字段
¥Document Service API: Populating fields
默认情况下,文档服务 API 不填充任何关系、媒体字段、组件或动态区域。此页面介绍如何使用 populate
参数填充特定字段。
¥By default the Document Service API does not populate any relations, media fields, components, or dynamic zones. This page describes how to use the populate
parameter to populate specific fields.
你还可以使用 select
参数仅返回查询结果中的特定字段(请参阅 select
参数 文档)。
¥You can also use the select
parameter to return only specific fields with the query results (see the select
parameter documentation).
如果安装了用户和权限插件,则必须为正在填充的内容类型启用 find
权限。如果角色无权访问内容类型,则不会填充该内容类型。
¥If the Users & Permissions plugin is installed, the find
permission must be enabled for the content-types that are being populated. If a role doesn't have access to a content-type it will not be populated.
关系和媒体字段
¥Relations and media fields
发布文档的一个或多个语言环境。
¥Queries can accept a populate
parameter to explicitly define which fields to populate, with the following syntax option examples.
为所有关系填充 1 级
¥Populate 1 level for all relations