How to import a Template in .xlr format inside a Folder using REST API

Follow

Shashank Srivastava -

Scenario
You need to import your Template(s) inside XL Release Folder(s) using REST API
Environment

XL Release

Steps to Perform

1. Find the folder ID of the Folder you want your Template to be imported to.

Its in the form of Applications/Folder707256767

2. Run below REST Call using your choice of REST client. I am demonstrating it using cURL command.

curl -u "username:password" "http://xl-release-server-IP/hostname:port/api/v1/templates/import?folderId=Applications/Folder707256767" -X POST -H "content-type:multipart/form-data" -F "data=@shashank.xlr"

3. It will import the Template shashank.xlr to Folder Applications/Folder707256767

admin@shashank-mbp ~/Downloads> curl -u "username:password" "http://localhost:5516/api/v1/templates/import?folderId=Applications/Folder707256767" -X POST -H "content-type:multipart/form-data" -F "data=@shashank.xlr"
[{"id":"Folder707256767-Release357326018","title":"shashank","warnings":["Teams in this template have been removed. They will be inherited from the folder."]}]

Caveats (if any)

Please ensure that you are specifying the correct location of your Template file.

 

Additional Information

NA

Tags
 kb, how-to
Have more questions? Submit a request
Powered by Zendesk