I’m thinking of replacing an existing website with discourse. The problem is the backend of that site contains a shared logic even for a mobile app and specific actions for the site.
So, having to keep an active server with that particular logic, I wonder if it is possible to send http requests from discourse to an external server. The ideal would be that at the occurrence of certain discourse events make a http request to my server.
Is this actually possible? If yes there is somewhere a guide?
Also is it possible to create a topic with specific fields and pass them into the http request?
Thank you everyone for the answer. No, I’m looking for a way to create a full API REST client and not a simple webhook.
What i am trying to replicate is a sort of marketplace when users can post their objects and then they can accept the various offers from others users. The logic of the marketplace should remain on the server but the front end should be discourse and so it should be updated according to the data on server.
I honestly don’t know what’s better to do for this situation, so i am looking for tips and references!
I also link to you the site (it is in italian) just to let you understand better what i am trying to migrate
I think some clarification is required in terms of what role Discourse would play here.
How does your use case relate to discussion/conversation. What would be done on discourse and what would be done on your server.
This is a broad statement. Discourse in itself is a whole system. What data would you show on Discourse which comes from or is synced with your other server.
From the information you’ve shared, it could be done via a plugin for sure. There are integrations for WordPress, GitHub, etc which might be doing a similar thing what you’re trying to do. But that’s me trying to read between the lines.
If you want to understand how to build plugins, here’s a great collection of links by @merefield
Ok, let me explain better from the beginning the idea:
I want to create a marketplace where users can sell or trade their items. Ideally every time a user creates a post he should enter specific fields to describe this object. Other users should have the opportunity to discuss the price of this item and bid through specific buttons and fields (which should be added using discourse).
Starting from this idea there are two ways I could take (if discourse allows it):
Every time a discourse interaction is made about such offers I would like my server to update or send the data.
Or, in case the above thing is not possible:
I would like to transfer all the logic to discourse using its internal database and I would like to create a service API rest on discourse that allows a mobile application to connect and use the service from mobile phone.
What is the better and fast idea to implement using discourse?