Create a support zip using the REST API

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Support zips help Atlassian Support understand how your application has been configured and troubleshoot your problem.  The most common way to generate a support zip is from the administration console of your application, however you can also use the REST API to create the zip. This is particularly useful for Data Center applications where you need to generate a zip from every node individually. 

The option to use REST to generate a support zip is only available for:

  • Jira applications running Atlassian Troubleshooting and Support Tools add-on 1.9.1 or later. 

You can upgrade this add-on at any time, head to Manage Add-ons and search for Atlassian Troubleshooting and Support Tools (if you're running an older version, it may be called Atlassian Support Tools). 

This page contains examples of using the Atlassian Troubleshooting and Support Tools REST API using curl. You can use the scripting language of your choice. 

Generate a support zip

You'll need System Administrator permissions to generate the support zip. 

To generate a support zip from the command line: 

curl -u <username>:<password> -X POST http://<app-node1.example.com:8080>/rest/troubleshooting/latest/support-zip/local

Remember, if your application is clustered, use IP address or URL of the individual node, not your application's base URL or load balancer URL. 

This returns the Task ID and progress information, for example:

{
   "taskId":"9e7b7012-0730-427b-bf85-607d15abadb5",
   "progressPercentage":0, 
   "progressMessage":"Processing"
}

Check the progress of the task

Often it can take some time to generate the zip, especially in large sites. To check the progress of the task:

curl -u <username>:<password> http://<app-node1.example.com:8080>/rest/troubleshooting/latest/support-zip/status/task/<taskId>

The task ID in this example would be 9e7b7012-0730-427b-bf85-607d15abadb5

This returns the current progress. In this example, the zip is complete and ready to be transferred from the appropriate home directory. 

{
"taskId":"9e7b7012-0730-427b-bf85-607d15abadb5",
"progressPercentage":100,
"progressMessage":"Your support ZIP can be found in your home directory at: C:\\<shared-home>\\export\\JIRA_support_node1_2018-04-03-11-37-37.zip or you can download a copy.",
"fileName":"JIRA_support_node1_2018-04-03-11-37-37.zip"
}


Check all recently requested support zips

To check the progress of all support zips recently requested on that node: 

curl -u <username>:<password> http://<app-node1.example.com:8080>/rest/troubleshooting/latest/support-zip/status/task

This returns details of any support zips being generated, or which were generated in the last 2 hours minutes, for example:

[{
    "taskId": "36b64a49-13d2-45b6-92d5-554577649906",
    "progressPercentage": 100,
    "progressMessage": "Your support ZIP can be found in your home directory at: /<shared-home>/export/JIRA_support_node1_2018-04-03-11-37-37.zip or you can download a copy.",
    "fileName": "JIRA_support_2018-04-03-11-37-37.zip"
}, {
    "taskId": "34d7cdce-12f7-4b46-b287-5f5040f2362b",
    "progressPercentage": 100,
    "progressMessage": "Your support ZIP can be found in your home directory at: /<shared-home>/export/JIRA_support_2018-04-03-11-24-58.zip or you can download a copy.",
    "fileName": "JIRA_support_2018-04-03-11-24-58.zip"
}]

We can only display recently requested support zips from the current session. If you restart your application, the REST API won't return details of any support zips requested before a restart. 

Troubleshooting

  • You need System Administrator permissions to generate the support zip. The request will fail with a permission error if you don't have adequate permissions. 
  • If you see a 404 error, make sure Jira is running, and has version 1.9.1 or later of the Atlassian Troubleshooting and Support Tools add-on.  You can update this plugin at any time, see Updating add-ons for more information. 
  • If nothing is returned in your terminal, then it is likely that you need to provide the URL of the specific node, not your application's base url (load balancer URL). 
  • If an 'XSRF check failed' error is returned, you can add the X-Atlassian-Token header to each request, setting the value to no-check. Adding this header to a request bypasses the server-side XSRF check and allows the request to be fulfilled.  For example:

    curl -u <username>:<password> -X POST http://<app-node1.example.com:8080>/rest/troubleshooting/latest/support-zip/local -H "X-Atlassian-Token: no-check"


Last modified on Apr 24, 2018

Was this helpful?

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