REST API 参考
¥REST API reference
REST API 允许通过 API 端点访问 content-types。创建内容类型时,Strapi 会自动创建 API 端点。查询 API 端点时可以使用 接口参数 来细化结果。
¥The REST API allows accessing the content-types through API endpoints. Strapi automatically creates API endpoints when a content-type is created. API parameters can be used when querying API endpoints to refine the results.
本文档的此部分用于 REST API 参考。我们还为特定用例提供了 guides。
¥This section of the documentation is for the REST API reference. We also have guides available for specific use cases.
默认情况下,所有内容类型都是私有的,需要公开或需要使用适当的权限对查询进行身份验证。有关更多详细信息,请参阅 快速入门指南、用户和权限功能 和 API 令牌配置文档 的用户指南。
¥All content types are private by default and need to be either made public or queries need to be authenticated with the proper permissions. See the Quick Start Guide, the user guide for the Users & Permissions feature, and API tokens configuration documentation for more details.
默认情况下,REST API 响应仅包含顶层字段,不会填充任何关系、媒体字段、组件或动态区域。使用 populate
参数 填充特定字段。确保为你填充的关系的字段授予查找权限。
¥By default, the REST API responses only include top-level fields and does not populate any relations, media fields, components, or dynamic zones. Use the populate
parameter to populate specific fields. Ensure that the find permission is given to the field(s) for the relation(s) you populate.
Strapi 客户端 库简化了与你的 Strapi 后端的交互,提供了一种获取、创建、更新和删除内容的方法。
¥The Strapi Client library simplifies interactions with your Strapi back end, providing a way to fetch, create, update, and delete content.