Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Rest API how to disable page creation/update notifications

Hello,

I am using confluence rest api and python module requests to create multiple pages in confluence. my tool has to run every day and delete old pages and create new pages with details. 

problem is while it creates new page it also send notification to the watcher of space. I do not want to send notification to watcher of space for new page creation.. 

code sample: 

invpagebodyhtml = "<p><b>This page is published by automation tool.</b></p>"
create_page = json.dumps(    {        "type""page",        "title""testing-notification",        "space": {"key""TEST"},        "ancestors": [{"id"1234567}],        "status""current",        "body": {"storage": {"value": invpagebodyhtml, "representation""storage",}},    })

 

response = requests.request(    "POST", URL, data=create_page, headers=headers,)

it creates the page but I could not find way to disable notification at time of page creation. 

As per my research on internet, I found https://community.atlassian.com/t5/Confluence-questions/Prevent-notifications-when-using-REST-API/qaq-p/948058 which says feature is not supported for page creation however minorEdit : true can be used for disabling notification for update on pages which I am looking for. 

any help here please? 

Thanks

Sukh

2 answers

1 accepted

0 votes
Answer accepted
Daniel Eads Atlassian Team Mar 06, 2020

Hey Sukh,

I can confirm that there's currently no notification suppression for page creation via API in Confluence Cloud. You can get more details about the feature request on our public Jira: https://jira.atlassian.com/browse/CONFCLOUD-38804

Thinking about your request, I have two ideas on how to stop the notifications:

  1. Do you need to delete the old pages and create new ones, vs simply updating the existing pages? If you could update the pages instead, you could make use of the 
    "minorEdit" : true

    parameter which would suppress notifications. If there's not a strong reason to delete the pages, this would be the easier approach.

  2. If these new pages all have the same parent, you could restrict the parent page while your script is running. As these new pages would be created in a restricted section, notifications would not be triggered for users without access. Your script would need to do the following:
    1. Restrict the parent page (Restriction call in the REST API) to be only visible to the user running the script
    2. Do the current delete/create process you have in your existing script
    3. Un-restrict the parent page

Although not as straightforward as just adding a parameter for page creation, I think you can get your desired results using one of these two methods.

Cheers,
Daniel

Thanks Daniel. We could suppress it by throwing users out of watching of space :) 

Thanks guys > did the same thing.

This was an issue for us when we were only updating attachments via API (vs content with a body).

Tried with both:

"minorEdit" : True

and

"minorEdit" : False 

included in API call data field, and it would still notify watchers via email.

 

Solution was to remove all watchers, update attachments, and the re-add the watchers back to affected pages.

 

Resources:

Get watches for page 

Remove watches for page 

Add content watcher 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

🥓🙅🏻‍♀️ Meet-less May Badge!

Hello Confluence Community!  What if i told you that you could have a healthier life and be 100% meet-less? This month, we're promoting a healthy, balanced work diet with Confluence. (Read m...

447 views 3 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you