diff options
Diffstat (limited to 'ui-react/src/api/LoopService.js')
-rw-r--r-- | ui-react/src/api/LoopService.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ui-react/src/api/LoopService.js b/ui-react/src/api/LoopService.js index 432eabec..d665f814 100644 --- a/ui-react/src/api/LoopService.js +++ b/ui-react/src/api/LoopService.js @@ -38,6 +38,24 @@ export default class LoopService { }); } + static createLoop(loopName, templateName) { + return fetch('/restservices/clds/v2/loop/create/' + loopName + '?templateName=' + templateName, { + method: 'POST', + headers: { + "Content-Type": "application/json" + }, + credentials: 'same-origin' + }) + .then(function (response) { + console.debug("CreateLoop response received: ", response.status); + return response.json(); + }) + .catch(function (error) { + console.error("CreateLoop error received", error); + return ""; + }); + } + static getLoop(loopName) { return fetch('/restservices/clds/v2/loop/' + loopName, { method: 'GET', |