Continuum API Javascript Reference
This feature is available in Ultimate edition only.
Overview
One of the 'libs' available in a Layout is catoapi
. This library includes helper functions for making calls to the Continuum API.
The Continuum API includes Automate features by default, and will include other features if other Continuum modules are installed. Both sets of endpoints are available using this library.
Click here for the API documentation.
The following functions can be used to make any documented Continuum API call.
.get
catoapi.get(_method, args, on_success_)
Will make a GET request to the API, and execute the defined on_success
function when the response is received.
For example, to get a Deployed Application named 'foo':
catoapi.get("get_deployment", {
"deployment" : "foo"
}, function(d) {
console.log(d);
});
.post
catoapi.post(_method, args_)
Will make a sychronous POST request to the API, and return the response.
Similar example as above:
var response = catoapi.post("get_deployment", {
"deployment" : "foo"
});
console.log(response);
.postAsync
catoapi.postAsync(_method, args, on_success_)
Make an asychronous POST to the API, and execute the defined on_success
function when the response is received.
Similar example as above:
catoapi.postAsync("get_deployment", {
"deployment" : "foo"
}, function(d) {
console.log(d);
});