API topic's external_ID can't be reused after deleting a topic and creating a new one

I understand why external ids can’t be re-used, but it would be handy if they could be. My use case is wanting to add external ids to topics that are pushed to Discourse from a user’s local file system with a CLI application.

The relationship between Discourse topics and local files is being maintained in a database. It’s kind of inevitable that databases will get deleted, corrupted, etc. It would be reassuring to know that the local database could be rebuilt based on the results of a Data Explorer query.

Unfortunately, not being able to re-use external ids after a topic is deleted will create another problem. I ran into it in the first 5 minutes of testing. Based on past experience with the WordPress plugin, it’s common for people to delete topics that have been created via the API. Especially when first setting up an integration.

Edit: maybe un-deleting the topic via the API would work for my use case.

1 Like