Find pinned topic via API endpoint

Hi Discourse community!

  1. For a customization task in our hosted forum, I am looking for an endpoint to gather pinned topics (read or unread by user, doesn’t matter). I can get all /latest.json topics and check for Topic.pinned or Topic.pinned_globally but this would only return me the first batch of topics that /latest.json returns. I need all pinned one, all on the instance.

Is there any or what would be the right way to get those using the API?

  1. Is “by period” searching possible on /latest.json? I only see it working on /top.json, which is not what we want. I would want to get latest topic grouped by time period. So I only need to know how to “define” that query basically and where - the rest I can do myself.

I am working in a hosted environment so I am limited to theme components.

Thank you!


  1. I ended up using the search URL to get the pinned topics:

Which is a search query without an actual search term :wink:

  1. No solution yet.