Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Does confluence Cloud supports Webhooks?

kuldeep kushwaha November 15, 2019


I have created confluence access token using the below-mentioned link,
https://developer.atlassian.com/cloud/jira/platform/oauth-2-authorization-code-grants-3lo-for-apps/

As per Atlassian Webhook Docs mentioned below
https://developer.atlassian.com/cloud/confluence/modules/webhook/

Confluence supports webhooks but URL to create webhook is not mentioned properly in the documentation.
Can you please help me with Url and parameters.

3 answers

2 accepted

2 votes
Answer accepted
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 27, 2019

Hello @kuldeep kushwaha ,

Allow me to step in and try to summarize everything that has been said till now.

However, before going any further, I'd like to also try to make clear that this is not the best place to ask development related questions. The right resources are listed in https://developer.atlassian.com/resources:

 

Once this has been said:

  1. In Confluence Cloud Webhooks can only be registered through the descriptor file of an add-on, not from the UI

  2. There is an open feature request to ask for the possibility to manage Webhooks through the UI: [CONFCLOUD-36613] Allow Confluence Webhook Administration 

  3. The frameworks to create an add-on for Confluence Cloud, including nodejs, are listed in this page: Frameworks and Tools

  4. Having the right skillset it should be quite easy to build a simple add-on that will just register some Webhooks that will send data to the desired endpoint in WebMethods in case of any update in Confluence Cloud.
  5. Once registered, Webhooks should be triggered almost immediately when the desired/configured events were fired. I am not sure what you mean with "instant updates". Can you provide more details on this?
  6. If you need further help with this you may want to ask in the developers community rather than in here: https://community.developer.atlassian.com/

 

I hope this clarifies.

 

Cheers,
Dario

webmethods-integration June 26, 2020

HI  @Dario B  @Shannon S 

Using the app descriptor file I am able to register webhook in Confluence Cloud and able to receive the JSON data as soon as an event is performed in Confluence.
But I noticed that the user who is within the administrator group was able to set webhook and other users were not.
I searched for the same but didn't find anything on Confluence Documentation.
So is there any restrictions with scopes regarding Webhook setup. If yes can you please provide me with the document link.

 

Regards,

Kuldeep Kushwaha

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 26, 2020

Hello @webmethods-integration ,

It is pretty normal that only admin can create webhooks and this is actually the same in Jira. Indeed, the page to create webhooks is in the Jira administration section (not accessible to non-admin users). 

If it wouldn't be this way, a malicious user would be able to create webhooks to send sensitive/private data to remote resources.

 

Also, for the future, please try to avoid adding questions to threads that are already 7 months old. Create a new thread instead. 

 

Have a nice weekend.

Cheers,
Dario

Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 28, 2023

Hi All,

@Dario B just added a new workaround to the CONFCLOUD-36613 feature request that I am reposting below to make sure it gets extra visibility, hope this helps y'all out:

Workaround

WARNING!

There is one security concern regarding webhooks created using the way explained below: even though they can only be created by admins, there are no other permissions checks. If a regular user creates a restricted page, admins won't be able to access it via Confluence UI/API, but they will be able to receive webhooks related to this page. The information of course is very limited, but they will be able to see a title of a page, for example. We fixed this for regular webhooks a couple of years ago, but here it's not possible since there is no user to check permissions against.

 

There exists a private API that can be used for this purpose. However, the endpoint discussed below is intended for internal use only. Therefore, it is not part of the official Confluence Cloud REST APIs, it is not supported and it can change without any notice.

Once this has been said: you can register, list or delete Webhooks in Confluence Cloud by using the internal REST API endpoint /wiki/rest/webhooks/1.0/webhook.

The endpoint works the same way as the /rest/webhooks/1.0/webhook endpoint documented for Jira Cloud in the Webhook documentation page, section: Registering a webhook using the Jira REST API (Other integrations)

 

To register a webhook using REST:

  1. Send a POST request using below format to: https://your-domain.atlassian.net/wiki/rest/webhooks/1.0/webhook
    {
      "name": "Webhook (test comment created)",
      "url": "https://www.example.com/webhooks",
      "events": [
        "comment_created"
      ]
    } 
  1. The response will return the webhook in JSON with additional information, including the user that created the webhook, the created timestamp, etc.

For a complete list of events, etc, please refer to the Confluence Cloud Webhook documentation page.

 

To unregister (that is, delete) a webhook using REST:

Example:
The following would delete the webhook with an ID of 70:

curl --user EmailAddress:ApiToken -X DELETE -H "Content-Type: application/json" https://your-domain.atlassian.net/wiki/rest/webhooks/1.0/webhook/70

 

To query a webhook using REST:

Example:

curl --user EmailAddress:ApiToken -X GET -H "Content-Type: application/json" https://your-domain.atlassian.net/rest/webhooks/1.0/webhook

 

Example: the following would get a webhook with an ID of 72

curl --user EmailAddress:ApiToken -X GET -H "Content-Type: application/json" https://your-domain.atlassian.net/rest/webhooks/1.0/webhook/72
Like Dario B likes this
0 votes
Answer accepted
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 20, 2019

Hello @kuldeep kushwaha,

Confluence Cloud does have Webhooks, as you have already discovered. However, Confluence does not have a Webhook administration page as in Jira. We have the below feature request for this:

Webhooks can be registered through the descriptor file in Confluence Cloud as mentioned on this thread from our Developer Community, Are webhooks available to add-ons in Confluence Server

In case you have any further questions about this, I advise you to raise a question on the Developer Community that I linked above. Be advised that the regular Atlassian Community is focused on end-users, so you're more likely to find the help you need from the Developer Community.

Regards,

Shannon 

kuldeep kushwaha November 24, 2019

Hi,
Can we create Confluence plugin using node js if so can you please provide me with the link.

And can Confluence plugins act as webhooks and provide me with the latest update.

 

Regards 
Kuldeep Kushwaha

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 25, 2019

Kuldeep,

Yes, you can! Here's the documentation below:

If you have any questions regarding this, please reach out to the Developer Community instead; they will be able to answer any questions for you related to developing for Atlassian products.

Regards,

Shannon

kuldeep kushwaha November 26, 2019

 

Hi,


I want to integrate confluence with our product webMethods.io Integration in the same was as slack is integrated with confluence.
Any changes made in confluence is notified to me on our notification url can we achieve this through macro.


I asked the same query on the Atlassian community.
https://community.atlassian.com/t5/Confluence-questions/Want-to-create-addon-integrate-webMethods-io-to-receive/qaq-p/1237238

The above link provided by you explains how to create macros but can I achieve instant notification updates by using macros.


Could you please help me with this.

Regards
Kuldeep Kushwaha

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 27, 2019

Hi Kuldeep,

Thank you for the explanation. I'm not familiar with creating add-ons, so I don't have any information on that, unfortunately.

You'll want to raise this question on the  Developer Community that I let you know about. The folks there are more familiar with add-on and macro development for Confluence, and they'll be able to give you advice.

Regards,

Shannon

kuldeep kushwaha November 27, 2019

Hi,

Can you just give me the rough estimate,  by what time Confluence cloud will support webhooks for instant updates?

Regards
Kuldeep Kushwaha 

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 27, 2019

Hello Kuldeep,

Can you elaborate on what you mean by instant updates? I confirmed earlier that webhooks are supported in Confluence. Administration of webhooks is not supported, and that's the feature request I sent you.

At this point, it's a feature request, so there is no estimate as to when or if this will be implemented. You can see our Implementation of New Features Policy for details on how we choose to implement new features.

If, at some point in the future, a feature is chosen to be implemented, updates will be included on the feature request ticket. You can watch a ticket in order to be included on those updates.

Regards,

Shannon

kuldeep kushwaha November 27, 2019

Hi,

By Instant Updates I mean provide me with JSON Data as soon as some event Is Performed in Confluence Pages or Spaces.

But as u said Webhooks are available under descriptor file in Confluence Cloud
Can you just help me with where can I find the Descriptor file?

Regards

Kuldeep Kushwaha

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2019

Hi @kuldeep kushwaha ,

I believe you are mixing 2 things that have nothing to do with each other. However, to make sure we are all on the same page:

 

 

Finally, in the below page is explained how to build an add-on that, among the other things, listens and responds via a Webhook when a new page is created in Confluence:

 

Please notice that I am providing this just as an example. The above page is not part of our official documentation, is not supported by us and it might be outdated. 

 

I hope this clarifies.

 

Cheers,
Dario

 

Like # people like this
0 votes
Vadim Rutkevich
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2020

Hi @kuldeep kushwaha !

You can try to use Webhook Manager for Confluence Cloud. It provides an easy way to manage and administer Confluence webhooks.

Thanks.

 

Sincerely, Vadim [StiltSoft]

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events