文档服务 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
查询可以接受一个 populate 参数来明确指定要填充的字段,语法选项示例如下。
🌐 Queries can accept a populate parameter to explicitly define which fields to populate, with the following syntax option examples.