orli
(orjanL)
2021 年 9 月 10 日午前 10:32
1
Hi, I would like to create some weekly statistic reports using the REST API. I will be doing this for
forum linkingyourthinking com
but I would like to start early before I have gotten the keys from the administrator which might take a while, since they are in the middle of a 6 week workshop.
So I was hoping to begin right now with try.discourse.org , Is that possible? I have tried
curl -X GET https://try.discourse.org/site.json
and it works nicely.
You can set up a local development instance of discourse for such work. It is fairly simple to do so.
See How do I set up a local Discourse Development Environment?
「いいね!」 6
orli
(orjanL)
2021 年 9 月 10 日午前 11:51
3
Thanks for the tip! Will there by any demo data in such an instance: users, groups and posts?
「いいね!」 1
There will be some default seeded data but you’re always free to create some data as per your own need.
「いいね!」 2
Falco
(Falco)
2021 年 9 月 10 日午後 1:04
5
If you are doing reports on public data on try.discourse.org you won’t need the API keys, as the GET requests will work just fine without it!
「いいね!」 3
orli
(orjanL)
2021 年 9 月 10 日午後 1:11
6
Thank you! I don’t have the terminology clear for me right now. I want to
list all groups
for each group, list group member statistics: seen, posts, read time, …
do this on a weekly basis and mail to the group leaders/guides.
That data is probably not public?
「いいね!」 1
Falco
(Falco)
2021 年 9 月 10 日午後 1:20
7
It is! Discourse aims to be an open and crawleable platform by default . In fact you can even do the same on Meta.
orli:
list all groups
curl https://meta.discourse.org/g.json
orli:
for each group, list group member statistics: seen, posts, read time, …
curl https://meta.discourse.org/groups/translators/members.json?offset=0&order=&asc=true&filter=
https://meta.discourse.org/u/falco/summary.json
Group leader data will be on the first request.
「いいね!」 7
APIキーとAPIユーザー名の違いと使い方を教えていただけますか。
Canapin
(Coin-coin le Canapin)
2025 年 1 月 28 日午後 3:47
9
API ユーザー名は、有効になっている機能を Discourse に伝えます。管理者と一般ユーザーでは機能が異なり、どちらを使用するかによって API で達成できることが制限されます。
API キーは、API ユーザー名と共に使用するパスワードです。
「いいね!」 1
私のシナリオでは、Discourse APIのみを使用したいと考えています。私のアプリを使用するすべてのユーザーが投稿、いいね、コメントなどの機能を使用できる場合、それぞれのAPIを使用するためにユーザーごとにAPIユーザー名とAPIキーを作成する必要がありますか?
ドキュメントによると、「すべてのユーザー」API キーを作成しましたが、このエラーが発生しています。
{
"errors": [
"You are not permitted to view the requested resource. The API username or key is invalid."
],
"error_type": "invalid_access"
}
Postman で /tags.json API を呼び出す際に発生しました。
これを解決するのを手伝ってもらえますか?