I think we have what you are looking for, already: https://docs.discourse.org/#tag/Topics
Check out Discourse REST API Documentation, maybe what you want already exists.
I think we have what you are looking for, already: https://docs.discourse.org/#tag/Topics
Check out Discourse REST API Documentation, maybe what you want already exists.