"Api-Key" و "Api-Username" لموقع try.discourse.org؟

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 إعجابات

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)

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 إعجابات

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)

It is! Discourse aims to be an open and crawleable platform by default. In fact you can even do the same on Meta.

curl https://meta.discourse.org/g.json

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.

:slightly_smiling_face:

7 إعجابات

مرحباً، هل يمكن لأحد أن يخبرني بالفرق بين مفتاح واجهة برمجة التطبيقات (Api-key) واسم مستخدم واجهة برمجة التطبيقات (Api-Username) وكيفية استخدامهما؟

سيحدد اسم مستخدم واجهة برمجة التطبيقات (API) لـ Discourse أي القدرات ممكّنة. لا يمتلك المسؤول أو المستخدم العادي نفس القدرات، وسيؤدي استخدام أحدهما أو الآخر إلى تقييد ما يمكنك تحقيقه باستخدام واجهة برمجة التطبيقات (API).

مفتاح واجهة برمجة التطبيقات (API) هو كلمة المرور التي سيتم استخدامها مع اسم مستخدم واجهة برمجة التطبيقات (API).

إعجاب واحد (1)

إذًا في السيناريو الخاص بي، أريد فقط استخدام واجهة برمجة تطبيقات discourse و ارتباكي هو أن كل مستخدم يستخدم تطبيقي يمكنه إنشاء منشورات وإعجابات وتعليقات وميزات أخرى، فهل أريد الآن إنشاء اسم مستخدم لواجهة برمجة التطبيقات ومفتاح واجهة برمجة تطبيقات لكل مستخدم لاستخدام واجهات برمجة التطبيقات الخاصة بهم؟

هل قرأت وثائق واجهة برمجة التطبيقات؟

خاصة هذا

وأيضًا هذه

إعجاب واحد (1)

وفقًا للمستند، لقد أنشأت مفتاح واجهة برمجة تطبيقات “All users” ولكني أواجه هذا الخطأ

{
    "errors": [
        "You are not permitted to view the requested resource. The API username or key is invalid."
    ],
    "error_type": "invalid_access"
}

في Postman أثناء استدعاء واجهة برمجة التطبيقات /tags.json.
هل يمكنك مساعدتي في هذا؟

هل يمكنك نشر طلبك بالكامل هنا؟

إعجاب واحد (1)