Group API,空响应

I have a small program that daily does some work on the groups of my Discourse installation, and to do that it starts by fetching all the groups using the json API:

GET https://disc.uaar.it/admin/groups.json?api_key=xxxx&api_username=xxx

Suddenly a few days ago this call stopped working. Now I get a 200 response code (the login is OK, and there is no error in the logs), but the response is empty and its content type is text/plain.

I’m running v1.9.0.beta5 +8, but I cannot check if this happened at the same time as an upgrade, because the system admin is on vacation :stuck_out_tongue:

Any thoughs?

We moved this route to https://disc.uaar.it/groups/search.json

I see, thanks!

Is there a list of modified routes?

It’s very rare to modify routes like that, but since we had a lot of new stuff around groups, this route was needed for normal users and had to be moved from /admin scope.

看起来这个路由也变了……:{{base_url}}/admin/groups

Discourse 的 API 是最新的吗?Discourse API Docs

这确实是 OP 所说的那条路线。

它确实是在 3 年前搬迁的。你遇到的具体问题是什么?

Discourse 共享的 Postman 文件在配置参数和标头方面存在一些 issues。

我最终通过以下方式使其生效:在 Discourse 设置界面中为用户启用“授予权限”,并添加如下标头: