# 获取我实例所有API端点的编程方式？

**URL:** <https://meta.discourse.org/t/programmatic-way-to-get-all-api-endpoints-for-my-instance/362648>\
**Category:** Development\
**Tags:** rest-api\
**Created:** [2025年四月19日 23:59 UTC](https://meta.discourse.org/t/programmatic-way-to-get-all-api-endpoints-for-my-instance/362648 "2025-04-19T23:59:49Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2025年四月21日 22:05 UTC](https://meta.discourse.org/t/programmatic-way-to-get-all-api-endpoints-for-my-instance/362648/10 "2025-04-21T22:05:43Z")

</div>

> [@mcwumbly](#):
>
> 那么，我们可以对后端 API 做出哪些稳定性保证？
> 
> 我认为这是 API 文档 _应该_ 解决的责任。

稳定性保证应通过简单的 API 版本控制来解决。

> [@mcwumbly](#):
>
> 首先，作为一种更高级别的思维模型，我会这样描述：
> 
> - 我们文档的主要入口点在这里，正如您指出的那样：[文档 - Discourse Meta](https://meta.discourse.org/c/documentation/10)
> - 开发者文档在这里：[这里](https://meta.discourse.org/c/documentation/developer-guides/56)，或者也许更好的是：[Discourse 开发入门](https://meta.discourse.org/t/introduction-to-discourse-development/349939?silent=true)
> - API 文档是开发者文档的一个子集，位于此处：[https://docs.discourse.org/](https://docs.discourse.org/)
> 
> 我会将 API 文档称为 _文档_ 而不是 _规范_，但我同意它们仍然是我们开发者文档的一个子集。这些文档的 URL 很奇怪……我们的完整文档应该在那里，或者那里应该重定向到 [https://meta.discourse.org/c/documentation/10，并且应该有一个明确的指示从](https://meta.discourse.org/c/documentation/10%EF%BC%8C%E5%B9%B6%E4%B8%94%E5%BA%94%E8%AF%A5%E6%9C%89%E4%B8%80%E4%B8%AA%E6%98%8E%E7%A1%AE%E7%9A%84%E6%8C%87%E7%A4%BA%E4%BB%8E) [Discourse 开发入门](https://meta.discourse.org/t/introduction-to-discourse-development/349939?silent=true) 到 API 文档。

这个主题不是关于文档的去向——而是关于 API _如何_ 被记录。缺失的是像 OpenAPI 这样的标准化、机器可读的格式。

这种缺失，加上缺乏版本控制，使得集成工作比应有的更困难、更脆弱。即使是已记录端点的基本 OpenAPI 模式也会非常有帮助。

---

_[View the full topic](https://meta.discourse.org/t/programmatic-way-to-get-all-api-endpoints-for-my-instance/362648)._
