I've been using POST cliTemplateConfiguration/upload to upload CLI Templates into Prime but I'm having issues with templates which use global variables (they're not being populated when I deploy the template). If I post the following template with local variables I can deploy without a problem and the hostname gets set to 'carlsrouter'
What version of Prime Infrastructure are you using? We tried reproducing this issue on 3.1.0 but couldn't get it to reproduce. As long as we defined the global variable in the UI, simply specifying it in the cliTemplate/content request parameter, like you do in your ZEN-HOSTNAME-POSTED2 example, works.
Carl, my apologies. There was a UI save happening afterwards that would cause the template to function properly during deployment when we attempted to reproduce this issue. We'll work on getting this issue fixed. I've created CSCvc11240 to track this issue (it's not publicly visible yet but should be within 24 hours).
Workarounds we'd suggest right now is either:
Use template-specific (non-global) variables and populating the values as needed during deployment
After uploading the template, open it in the UI and click the save button.
Thank you for bringing this issue up and thank you for your patience. I very much appreciate it.