REST API 指南
🌐 REST API Guides
REST API 参考 文档旨在为所有可用的端点和参数提供快速参考。
🌐 The REST API reference documentation is meant to provide a quick reference for all the endpoints and parameters available.
指南
🌐 Guides
以下指南由 Strapi 文档团队官方维护,涵盖专门主题并为某些用例提供详细说明(用 🧠 表示的指南)或分步说明(用 🛠️ 表示的指南):
🌐 The following guides, officially maintained by the Strapi Documentation team, cover dedicated topics and provide detailed explanations (guides indicated with 🧠) or step-by-step instructions (guides indicated with 🛠️) for some use cases:
理解填充
了解填充(populating)是什么意思,以及如何在你的 REST API 查询中使用 populate 参数向响应中添加额外字段。
如何填写创建者字段
阅读逐步说明,了解如何构建一个自定义控制器,该控制器利用 populate 参数将 'createdBy' 和 'updatedBy' 数据添加到查询响应中
附加资源
🌐 Additional resources
本节中列出的一些附加资源是为 Strapi v4 创建的,可能无法完全适用于 Strapi 5。如果你想将以下文章中的某一篇更新为适用于 Strapi 5,请随时 propose an article 加入社区写作计划。
其他教程和指南可以在以下博客文章中找到:
🌐 Additional tutorials and guides can be found in the following blog posts:
什么是 REST API?初学者指南 + 使用 Strapi 的示例
了解 REST API 的基本原则以及如何使用 Strapi REST API。
使用 REST API 进行请求身 份验证
了解如何使用 JSON Web 令牌和 API 令牌验证你的 REST API 查询。
使用 Fetch 调用 Strapi 的内容 API
探索如何使用 Fetch API 的 fetch() 方法与 Strapi 的内容 API 进行交互。
在内容分发网络(CDN)后请求 Strapi 的 REST API
了解如何通过使用 CDN 和 Strapi 的 REST API,在请求大量媒体资源时克服网络延迟问题。