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
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:
"minorEdit" : true
parameter which would suppress notifications. If there's not a strong reason to delete the pages, this would be the easier approach.
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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.