If I look at the JSON of the topic (appending .json to the back of the url), how do I find out when the topic was last bumped (not when the last post was bumped)̀?
AI-generated summary
The discussion explores how to determine when a topic was last bumped using the Discourse REST API. NateDhaliwal asks how to find the bump date from the topic JSON. JammyDodger notes that the topic JSON doesn’t show bump info, but the topic list might, as it displays ‘last activity’ like ‘2 mins ago’ even if no new posts were made. Lilly suggests checking the bumped_at field in /latest.json, which could contain the bump timestamp. JammyDodger confirms this seems promising and references a topic example where the activity date in the list differs from the last post date, indicating a bump occurred. NateDhaliwal finds the suggestion interesting and plans to investigate further.
I can’t see anything in the topic json.
Could it be in the topic list instead? I think that’s where you see the ‘last activity’ for the topic. eg. when a topic picks up a spam post which then gets deleted, but the topic didn’t get a ‘reset bump date’ - the topic list would say something like ‘2 mins’ but when you went into the topic the only activity dates you see are the last post (which could be months/years earlier)
hmmm
what about the bumped_at":"xxxx” for topics in /latest.json, for example?
That sounds promising. I’m on my phone at the moment so json diving is a little tricky, but the example topic I was looking at is Allow anon to view who voted on a topic from 11 days ago.
And it appears in Contribute > UX (and /latest, etc) with an activity date of ‘6 days’ ago:
Does the ‘bumped at’ one you found show the right(/expected) bump for that topic?
Hmm… this looks interesting. I’ll take a look, thanks!
