How to disable Collaborative Editing through REST API call

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Purpose

If you are unable to edit pages you might need to temporarily disable the Collaborative Editor while following the Troubleshooting Collaborative Editing guide. Sometimes the Collaborative Editor cannot be disabled via the UI as described in Administering Collaborative Editing. If you are affected by this, you can alternatively disable it through a REST call.

Solution

Disabling Collaborative Editing will delete any shared drafts that might exist.

  • Send a POST to <base_url>/confluence/rest/synchrony-interop/disable
  • Sample Python script that will disable Collaborate Editing:

    import requests
    
    
    def main():
        # Change the following to work with your Confluence instance including any context path
        base_url = 'http://localhost:8090/'
        username = 'admin'
        password = 'admin'
        # End change block
    
        session = requests.session()
    
        session.auth = (username, password)
    
        headers = {'X-Atlassian-Token': 'no-check'}
    
        resp = session.post('{0}/rest/synchrony-interop/disable'.format(base_url),
                headers=headers)
        print(resp)
        print(resp.content)
    
    main()




Last modified on Dec 17, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.