The external_id feature, introduced in Discourse 2.9.0 beta2, allows API users to assign a custom identifier (up to 50 characters, including - and _) to topics for easier synchronization with external systems like bug trackers. It is API-only and applies only to topics, not posts blake. Users like mattdm find it useful for linking topics to external resources, replacing hacky workarounds like parsing link_countsmattdm. While external IDs can be arbitrary (e.g., bug numbers, not full URLs) mattdm, there’s a request to expose this feature in embed.js for external page integrations Aaron_B. Canapin directs follow-up discussion to a dedicated topic.
Add support for external_id to be used when creating and fetching topics. This is an API-only change
I have several (experimental at this point) api-based bots which link topics to external resources (like related bug or issue trackers relating to a conversion). https://docs.discourse.org tells me what this is but not a lot of details of how this is meant to be used. Is there a longer explanation? It seems like this could be really useful!
What drove this feature is that a lot of sites need to interact with discourse via some other external application but they often don’t have a good way of keeping track of all the internal discourse id’s for things to keep things in sync. Now that you can create a topic with an external_id it can become a lot easier to match up a specific discourse topic with a resource in your own application.
Just to clarify this new external_id feature is only for topics, not posts. So a topic can store an external_id, but a post cannot.
Thanks @blake. So, “external_id” can be arbitrary from my side? For https://ask.fedoraproject.org/c/common-issues/141/none, I’ve been doing something fairly horrible — getting the top post and then scanning the link_counts list for URLs which match the pattern of the external resource.
Can someone PLEASE expose external_id to the embed.js interface? I really need to show posts on an external page connected to an external_id where I don’t know the topic_id.