How to clean System Errors in Bamboo from command line

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

    

Summary

Bamboo offers a way to remove System Errors from the Administration page. For more information, please refer to How to bulk clear System Errors from build plans.

If the error list is too large, this page can timeout, blocking the user from the possibility to delete them.

Environment

Any Bamboo supported version.

Diagnosis

When trying to open the page "System errors", the loading of the page will fail and the user won't reach the option to delete them.

Solution

When removing errors, Bamboo calls the endpoint "removeAllErrorsFromLog.action". This article offers a way to reach the endpoint from command line instead, avoiding the timeout.

(info) For this approach  we don't have an official REST endpoint, therefore we need to disable XSRF protection in order to make it work.

To proceed, please do the following:

  • Disable XSRF protection:
    1. Visit "Administration -> Security Settings".
    2. Scroll to the end, click on edit.
    3. Disable the check " Enable XSRF protection".
    4. Save
  • Then proceed to make the call. The command is
curl --user USER:PASSWORD -X POST -H "Content-Type: application/json" BASE_URL/removeAllErrorsFromLog.action

(make sure you put your credentials and update the Base URL)

  • Once this is over, you can re-enable XSRF protection.


Last modified on Oct 13, 2021

Was this helpful?

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