Api access to https://discourse.llvm.org/?

Hi,

is it possible to get API access to https://discourse.llvm.org/? I want to get read only access to I can write a plugin for this helpful tool: GitHub - psss/did: What did you do last week, month, year? .

@tstellar , you’re listed as an admin. Is this feature only available when you’re an admin of discourse?

Regards
Konrad

@tonic Do you know if this is possible?

I was also unable to use a discourse integration to view unread posts outside of LLVM’s discourse instance.
Since applications like that need API access, it’s currently not working.

Can you explain a bit more what you plan to do with this information?

I plan to use the API for personal use only, i like to integrate the websites/services (calendar, Github,…), that i use in a dashboard.
It allows me to know what things i need to read/pay attention without going on the actual website (like RSS feeds, but specific to your account for things like pings and notifications when you are watching a topic).

I have searched in the Discourse documentation and i have found all API endpoints i probably need (they are all GET requests):

You may also need these endpoints in order to display the notification correctly:

Optionally the ability to search on discourse (this is feature available with my discourse integration)

I do not think i need more endpoints for that but @kwk needs at least the Search for a term endpoint and maybe dependent endpoints related to categories and tags.

I hope my answer is detailed enough.

@tonic, yes I can explain. We all leave breadcrumps of our work in various places and some of them we visit regularly. The did CLI tool is something I run locally to pick up those breadcrumps and help me curate a list of what I’ve done over the past week. What discussions did I participate in? Which bugzillas have I closed? Which gihub/gitlab issues have I worked on? etc. I think you get the idea. For did there are many plugins available. I’m working on a plugin for phabricator as well so I can avoid copying the link to the discussion and the title of the differential (Add phabricator plugin by kwk · Pull Request #279 · psss/did · GitHub). In particular I would like to find out which discourse topics I’ve created, read, commented on.

Why would I need the search endpoint?

I have seen that you want to be able to search what the user did in a specific time interval (today/this week/this month/this year/…) ,and searching for a term using his username and filtering by time can help (at leat from what your readme is saying).

NB: I haven’t seen a easy way to filter by time a post/topic easily. I also think it’s better that you take a look at the discourse API documentation to know what endpoints you need (i don’t think admins will open all the endpoints), at least it helps them to figure out what we need from the API.