Trying to develop a simple Dashboard gadget


I’m looking to build a custom gadget to be able to add to Jira Dashboards. I’ve followed the docs to create a simple XML file with Hello World content. Where I’m stuck is hosting the xml somewhere so that I can pull it in on the Manage Gadgets page. My first try was to build a custom REST Endpoint in Scriptrunner and generate the xml on the fly and return it in the response but when I give the Manage Gadgets box the url to the REST EP I get “Something went wrong” and the gadget doesn’t load.

What’s odd is that I can put the xml in a file and attach it to a Confluence page and use the url to that attachment file in the Manage Gadget widget and it DOES load the gadget.

I’ve tried looking at the responses to the two different urls by calling them in Postman and I don’t really see a major difference. Certainly the xml body is the same. The headers are the same in all areas that seem like it would matter.

I’d rather be able to generate the gadget dynamically via the REST endpoint if I can but I don’t understand why that isn’t working.

Thanks for any guidance.