# API / Functionality required to push Data from Discourse to external resource

**URL:** https://meta.discourse.org/t/api-functionality-required-to-push-data-from-discourse-to-external-resource/290267
**Category:** Development
**Created:** [January 2, 2024, 1:04pm UTC](https://meta.discourse.org/t/api-functionality-required-to-push-data-from-discourse-to-external-resource/290267 "2024-01-02T13:04:45Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Aditya\_Shevle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aditya_shevle/32/347008_2.png) [@Aditya\_Shevle](https://meta.discourse.org/u/Aditya_Shevle)
#### Post date: [January 2, 2024, 1:04pm UTC](https://meta.discourse.org/t/api-functionality-required-to-push-data-from-discourse-to-external-resource/290267/1 "2024-01-02T13:04:45Z")

</div>

We need to pass on the data of TOPICS being created, COMMENTS being given by an user to our internal CRMS panel, for analysing some data and deriving few reports based on that data. Is it possible?

---

<div class="post-metadata">

### Author: ![Aditya\_Shevle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aditya_shevle/32/347008_2.png) [@Aditya\_Shevle](https://meta.discourse.org/u/Aditya_Shevle)
#### Post date: [January 3, 2024, 4:33am UTC](https://meta.discourse.org/t/api-functionality-required-to-push-data-from-discourse-to-external-resource/290267/3 "2024-01-03T04:33:06Z")

</div>

Can you please provide an example for the same?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [January 3, 2024, 10:06am UTC](https://meta.discourse.org/t/api-functionality-required-to-push-data-from-discourse-to-external-resource/290267/4 "2024-01-03T10:06:22Z")

</div>

This might help you with part of the solution:

> [@Reverse engineer the Discourse API](https://meta.discourse.org/t/reverse-engineer-the-discourse-api/20576):
>
> Discourse is backed by a complete JSON api. Anything you can do on the site you can also do using the JSON api. The API is documented at [docs.discourse.org](https://docs.discourse.org). You can also use the [discourse\_api](https://github.com/discourse/discourse_api) Ruby gem as a client library. However, not every endpoint is documented. To determine how to do something with the JSON API here are some steps you can follow. Example: recategorize a topic. Go to a topic and start editing a category: Open Chrome dev tools, switch to the Network tab, select …

---

<div class="post-metadata">

### Author: ![Aditya\_Shevle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aditya_shevle/32/347008_2.png) [@Aditya\_Shevle](https://meta.discourse.org/u/Aditya_Shevle)
#### Post date: [January 3, 2024, 1:31pm UTC](https://meta.discourse.org/t/api-functionality-required-to-push-data-from-discourse-to-external-resource/290267/5 "2024-01-03T13:31:16Z")

</div>

Right now, the XHR that are getting shown in NETWORK TAB are used for storing the data in DISCOURSE DB.

We wanted to have an EVENT-OBSERVER kind of a thing in which, as soon as TOPIC/REPLY get created on DISCOURSE(this is an EVENT), an OBSERVER will push that TOPIC/REPLY data to 3rd party portal for storing purpose at 3rd party DB end.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [January 3, 2024, 1:36pm UTC](https://meta.discourse.org/t/api-functionality-required-to-push-data-from-discourse-to-external-resource/290267/6 "2024-01-03T13:36:45Z")

</div>

Webhooks?

> [@Configure webhooks that trigger on Discourse events to integrate with external services](https://meta.discourse.org/t/configure-webhooks-that-trigger-on-discourse-events-to-integrate-with-external-services/49045):
>
> A webhook is a way to notify external services about changes on the internet. It’s easier to setup, manage and develop than a Discourse plugin. Though, it does require you to program a little bit or understand its technical details. In this #howto, I’ll set up webhook to power a Github bot for referencing pull request brought in a forum. We’ll want to see a new comment on Github pull request when a new post has a link to it. It’s a very simple process: Publish a new post. A webhook event happ…

> [@Add new webhooks and customize webhook payload](https://meta.discourse.org/t/add-new-webhooks-and-customize-webhook-payload/59609):
>
> Ever wonder how to add new webhook types? Or how to reduce the payload? Here is the tutorial for the plugin authors. It demos how to add the session and user notification event types as well as customization to the payload. You can also check [the plugin on GitHub](https://github.com/fantasticfears/discourse-webhooks-example) while reading. If you’d like to have a new webhook type supported by the team, bring up a feature request instead. Before started, make sure you already understand [webhook guide](https://meta.discourse.org/t/setting-up-webhooks/49045). New webhook event type A new webhook event type is def…

and e.g.:

> [@Is it possible to manually trigger a web hook for post\_updated](https://meta.discourse.org/t/is-it-possible-to-manually-trigger-a-web-hook-for-post-updated/68074):
>
> I’m looking to make a change to the raw data for a bunch of my posts in a rake task and then re-cook the result. When this happens I also want to trigger the webhook for post\_updated What’s the best practice way to achieve this? Many thanks.

---

<div class="post-metadata">

### Author: ![Aditya\_Shevle](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aditya_shevle/32/347008_2.png) [@Aditya\_Shevle](https://meta.discourse.org/u/Aditya_Shevle)
#### Post date: [January 5, 2024, 11:40am UTC](https://meta.discourse.org/t/api-functionality-required-to-push-data-from-discourse-to-external-resource/290267/7 "2024-01-05T11:40:02Z")

</div>

Thank you, it helps!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [February 4, 2024, 11:40am UTC](https://meta.discourse.org/t/api-functionality-required-to-push-data-from-discourse-to-external-resource/290267/8 "2024-02-04T11:40:30Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
