Scroll Versions task automation (and REST API)
I have a relatively simple goal that is quickly snowballing into something much more complicated than expected.
We use Scroll Versions for documentation, and we use buttons on various pages that allow the user to download the documents in PDF via Scroll Exports. Each time we create a new version, we have to manually update all the links for those download buttons so that they will use the correct versionId when exporting.
My idea was to utilize HTML macros on each page that contain export buttons. I would run javascript inside the HTML macro to access the Scroll Versions REST API, fetch the versionId, then update the URLs for all the export buttons with the new versionId. I've encountered two main problems with this approach:
1. Any changes made by script in HTML macro only apply to the front end in the user's browser, and are not actually updating the pages on Confluence.
2. CORS errors make utilizing the Versions REST API via Javascript basically impossible. (seriously, what is the point of the REST API if I'm not allowed to access it with JS, and it isn't even supported by k15t? it works fine in the terminal using curl or when using a separate REST client, but when making the request via JS I get shut out due to CORS)
Does anyone have any other ideas on how I might achieve my end goal while also bypassing the issues stated above? I don't have much development experience and this is quickly going over my head, but I was hoping this would be a good opportunity to apply my basic programming skills to build something that would actually help me day-to-day. I would very much appreciate anyone has to offer.
Please sign in to leave a comment.
Comments
0 comments