An object that represents a combination of node and web service definition, that will be used for requests.
id ⇒ Integer
-
Web service id
name ⇒ String
-
Web service name
description ⇒ String
-
Web service description
get(…) ⇒ [class-webserviceresponse]
-
Execute GET request from agent on associated node. Associated node is the node on which getWebService method was executed. This node is used for macro expansion.
… |
Strings |
Optional additional parameter(s) that will be used in web service definition to expand %1, %2… macro. |
Instance of [class-webserviceresponse] with request result.
webSvc = $node.getWebService("webSvcName"); result = webSvc.get(); println(result.document); // will print result result = webSvc.get("additional", "parameters"); println(result.document); // will print result
delete(…) ⇒ [class-webserviceresponse]
-
Execute DELETE request from agent on associated node. Associated node is the node on which getWebService method was executed. This node is used for macro expansion.
… |
Strings |
Optional additional parameter(s) that will be used in web service definition to expand %1, %2… macro. |
Instance of [class-webserviceresponse] with request result.
webSvc = $node.getWebService("webSvcName"); result = webSvc.delete(); println(result.success); //will print "true" if request was successful or "false" otherwise result = webSvc.delete("additional", "parameters"); println(result.success); //will print "true" if request was successful or "false" otherwise
patch(data, contentType, …) ⇒ [class-webserviceresponse]
-
Execute PATCH request from agent on associated node. Associated node is the node on which getWebService method was executed. This node is used for macro expansion.
data |
String or [class-jsonobject] |
Data that will be set to the web service. |
contentType |
String |
Optional parameter. Type of provided data that will be set to "Content-Type" header of request. Default type is "application/json". |
… |
Strings |
Optional additional parameter(s) that will be used in web service definition to expand %1, %2… macro. |
Instance of [class-webserviceresponse] with request result.
webSvc = $node.getWebService("webSvcName"); result = webSvc.patch("{ \"id\":10 }"); println(result.success); //will print "true" if request was successful or "false" otherwise to json = new JsonObject(); json.set("id", 42); result = webSvc.patch(json,"application/json", "additional", "parameters"); println(result.success); //will print "true" if request was successful or "false" otherwise
post(data, contentType, …) ⇒ [class-webserviceresponse]
-
Execute POST request from agent on associated node. Associated node is the node on which getWebService method was executed. This node is used for macro expansion.
data |
String or [class-jsonobject] |
Data that will be set to the web service. |
contentType |
String |
Optional parameter. Type of provided data that will be set to "Content-Type" header of request. Default type is "application/json". |
… |
Strings |
Optional additional parameter(s) that will be used in web service definition to expand %1, %2… macro. |
Instance of [class-webserviceresponse] with request result.
webSvc = $node.getWebService("webSvcName"); result = webSvc.post("{ \"id\":10 }"); println(result.success);//will print "true" if request was successful or "false" otherwise json = new JsonObject(); json.set("id", 42); result = webSvc.post(json,"application/json", "additional", "parameters"); println(result.success); //will print "true" if request was successful or "false" otherwise
put(data, contentType, …) ⇒ [class-webserviceresponse]
-
Execute PUT request from agent on associated node. Associated node is the node on which getWebService method was executed. This node is used for macro expansion.
data |
String or [class-jsonobject] |
Data that will be set to the web service. |
contentType |
String |
Optional parameter. Type of provided data that will be set to "Content-Type" header of request. Default type is "application/json". |
… |
Strings |
Optional additional parameter(s) that will be used in web service definition to expand %1, %2… macro. |
Instance of [class-webserviceresponse] with request result.
webSvc = $node.getWebService("webSvcName"); result = webSvc.put("{ \"id\":10 }"); println(result.success); //will print "true" if request was successful or "false" otherwise json = new JsonObject(); json.set("id", 42); result = webSvc.put(json,"application/json", "additional", "parameters"); println(result.success); //will print "true" if request was successful or "false" otherwise