# Discourse API 是什么？

**URL:** https://meta.discourse.org/t/what-is-discourse-api/166416
**Category:** Support
**Created:** [2020年十月6日 18:46 UTC](https://meta.discourse.org/t/what-is-discourse-api/166416 "2020-10-06T18:46:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![likable24](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/likable24/32/196256_2.png) [@likable24](https://meta.discourse.org/u/likable24)
#### Post date: [2020年十月6日 18:46 UTC](https://meta.discourse.org/t/what-is-discourse-api/166416/1 "2020-10-06T18:46:37Z")

</div>

我想了解 **Discourse API** 。什么是 Discourse API？有人能给我解释一下吗？我的网站上是否有 Discourse API？  
链接：[Ders.co](http://Ders.co)

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [2020年十月6日 19:01 UTC](https://meta.discourse.org/t/what-is-discourse-api/166416/2 "2020-10-06T19:01:48Z")

</div>

> [@likable24](#):
>
> 我的网站上是否有 Discourse API？

Discourse API 用于在后台的 Ruby on Rails Discourse 应用程序与前端 Discourse JavaScript 之间传递数据。所有 Discourse 站点均可使用该 API。

您网站上 API 的一个简单示例是访问以下 URL：[https://ders.co/latest.json](https://ders.co/latest.json)。它会显示用于生成您站点最新主题列表的 JSON 数据。您可以通过向 `https://ders.co/latest.json` 发出 `GET` 请求，在另一个站点上使用这些数据。您可以利用该请求返回的数据，在另一个站点上重建最新主题列表。

有关 Discourse API 的详细信息，请参阅以下主题：

- [Discourse API 文档](https://meta.discourse.org/t/discourse-api-documentation/22706)
- [如何逆向工程 Discourse API](https://meta.discourse.org/t/how-to-reverse-engineer-the-discourse-api/20576)（该主题提供了确定执行某项操作所需 API 调用的有效方法。）

您还可以在此处找到有关 Discourse API 的详细信息：[https://docs.discourse.org/。](https://docs.discourse.org/%E3%80%82)

---

<div class="post-metadata">

### Author: ![likable24](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/likable24/32/196256_2.png) [@likable24](https://meta.discourse.org/u/likable24)
#### Post date: [2020年十月6日 19:10 UTC](https://meta.discourse.org/t/what-is-discourse-api/166416/3 "2020-10-06T19:10:16Z")

</div>

非常感谢 @simon，我现在已经检查过了。这个社区将帮助我改进我的网站。

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2020年十一月5日 19:16 UTC](https://meta.discourse.org/t/what-is-discourse-api/166416/4 "2020-11-05T19:16:24Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
